diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-08-07 15:02:09 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-08-07 15:02:09 -0700 |
commit | cf80555ee777f1adb7aad99287f5c144e0a5f6c6 (patch) | |
tree | 209f5db7ebe56e58e1e86770344876c29cc27cae | |
parent | 0e7642a0b8fa5ed6599ce3798d271ebbaa2f83f7 (diff) |
Cope with a NetBSD annoyance.
-rw-r--r-- | inet.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -54,6 +54,20 @@ struct mbuf; /* Squelch compiler warnings on some platforms for */ struct rtentry; /* declarations in <net/if.h> */ #include <net/if.h> #include <netinet/in.h> + +/* + * NetBSD insists on having <net/if.h> pull in <net/dlt.h>, so that + * including <net/if.h> defines a bunch of stuff we later define in our + * pcap/dlt.h; those definitions will be different, if they haven't + * picked up all of our changes yet. + * + * Undefine some of the offending items. + */ +#ifdef __NetBSD__ +#undef DLT_USB /* we now define it as DLT_FREEBSD_USB */ +#undef DLT_MATCHING_MAX /* we may define more DLT_ values than they do */ +#endif + #endif /* _WIN32 */ #include <errno.h> |