X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ziffy%2Fhooks.c;h=54742aa954eb7058d861f12eb3e56c42695c4007;hp=7645f749ad9350f2a91924022eac0474a62faa6a;hb=da7f94a6b0f603280dcae083f2e5c1627b817fe1;hpb=5fb7fa9318c6ea4a6aeecd515cc00fcd46709a3d diff --git a/ziffy/hooks.c b/ziffy/hooks.c index 7645f74..54742aa 100644 --- a/ziffy/hooks.c +++ b/ziffy/hooks.c @@ -20,12 +20,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define _BSD_SOURCE -#if defined(linux) -# if !defined(_BSD_SOURCE) -# define _BSD_SOURCE -# endif -#endif /* * Operating System include files @@ -36,10 +32,15 @@ #include #include -#include #include +#if HAVE_NET_IF_H #include +#endif + +#if HAVE_NETINET_IN_H +#include +#endif #if HAVE_NETINET_IF_ETHER_H #include @@ -210,9 +211,9 @@ z3950apdu * pduhook (const struct pcap_pkthdr * h, const u_char * p) printf ("ETHER: Total size = %d : header = %d : data = %d\n", eth_size, eth_hlen, eth_size - eth_hlen), printf ("ETHER: Source = %s\n", - etheraddr_string (dlt == DLT_NULL ? NULL : (char *) & e -> ether_shost)), + etheraddr_string (dlt == DLT_NULL ? NULL : (u_char *) & e -> ether_shost)), printf ("ETHER: Destination = %s\n", - etheraddr_string (dlt == DLT_NULL ? NULL : (char *) & e -> ether_dhost)), + etheraddr_string (dlt == DLT_NULL ? NULL : (u_char *) & e -> ether_dhost)), fflush (stdout), fmemdmp (stdout, (char *) e, eth_size, "Ethernet Packet");