From 021d31b61e0803758610e2bd83302d5955547ee0 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Sun, 22 Jul 2012 00:04:12 +0200 Subject: make it at least compile on linux. tested on archlinux --- glougloud/user.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'glougloud/user.c') diff --git a/glougloud/user.c b/glougloud/user.c index a23a5e1..644e092 100644 --- a/glougloud/user.c +++ b/glougloud/user.c @@ -4,6 +4,9 @@ #include #include +#if !defined(__OpenBSD__) +#define __FAVOR_BSD +#endif #include #include #include @@ -20,12 +23,9 @@ #include #include #include -#include - -#include #include "glougloud.h" -#include "imsgev.h" +#include "external/imsgev.h" /* XXX a user process should be able to have multiple clients, so that we * can send the same data to multiple machines with almost no overhead */ @@ -611,7 +611,11 @@ phandler_loop(u_char *user, const struct pcap_pkthdr *h, const u_char *p) len -= NULL_HDRLEN; ip_handle(ip, pend, len); break; +#if defined(__OpenBSD__) case AF_LINK: +#else + case AF_LOCAL: +#endif ep = (struct ether_header *)(p + NULL_HDRLEN); ether_type = ntohs(ep->ether_type); if (ether_type <= ETHERMTU) -- cgit v1.2.3-59-g8ed1b