aboutsummaryrefslogtreecommitdiff
path: root/fad-getad.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-07 14:59:58 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-07 14:59:58 -0700
commit0e7642a0b8fa5ed6599ce3798d271ebbaa2f83f7 (patch)
treef6fc19ffb47cd4e657c4ca6ac19cd3c820e453fb /fad-getad.c
parentc8d94a5c63517f39a5e00b3141d5ca04722e5582 (diff)
Cope with a NetBSD annoyance.
Diffstat (limited to 'fad-getad.c')
-rw-r--r--fad-getad.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fad-getad.c b/fad-getad.c
index b67b5cdc..bd869c70 100644
--- a/fad-getad.c
+++ b/fad-getad.c
@@ -42,6 +42,19 @@
#include <net/if.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
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>