aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-07 15:02:09 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-07 15:02:09 -0700
commitcf80555ee777f1adb7aad99287f5c144e0a5f6c6 (patch)
tree209f5db7ebe56e58e1e86770344876c29cc27cae
parent0e7642a0b8fa5ed6599ce3798d271ebbaa2f83f7 (diff)
Cope with a NetBSD annoyance.
-rw-r--r--inet.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/inet.c b/inet.c
index 16a483d4..73929c3d 100644
--- a/inet.c
+++ b/inet.c
@@ -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>