summaryrefslogtreecommitdiff
path: root/addrtoname.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2021-08-16 23:47:07 +0100
committerDenis Ovsienko <denis@ovsienko.info>2021-08-17 00:01:01 +0100
commit4f1a63c4c3b109d14b4df003baa85cbc373c82f6 (patch)
treee09b66e7e63add5d1860b56d739133f1a2714cf7 /addrtoname.c
parentb73d5ba2125bb5f0a6c42afd7542acab0cab320f (diff)
downloadtcpdump-4f1a63c4c3b109d14b4df003baa85cbc373c82f6.tar.gz
Fixup commit 604cd4a for OpenIndiana.
SunOS openindiana 5.11 illumos-755ccbcfa2 i86pc i386 i86pc gcc (OpenIndiana 10.3.0-oi-0) 10.3.0 As it turns out, in OpenIndiana 2021.04 ND_UNREACHABLE is one of the neighbour discovery states in <net/if.h>: In file included from ./extract.h:40, from ./addrtoname.h:22, from ./addrtoname.c:112: ./diag-control.h:181: warning: "ND_UNREACHABLE" redefined In file included from ./addrtoname.c:87: /usr/include/net/if.h:307: note: this is the location of the previous definition In file included from ./extract.h:40, from ./addrtoname.h:22, from ./print-sll.c:36: ./diag-control.h:181: warning: "ND_UNREACHABLE" redefined In file included from ./print-sll.c:29: /usr/include/net/if.h:307: note: this is the location of the previous definition
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/addrtoname.c b/addrtoname.c
index eb3df77e..34e2ff47 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -84,6 +84,11 @@
#endif /* what declares ether_ntohost() */
#ifdef NEED_NETINET_IF_ETHER_H
+ /*
+ * Include diag-control.h before <net/if.h>, which too defines a macro
+ * named ND_UNREACHABLE.
+ */
+ #include "diag-control.h"
#include <net/if.h> /* Needed on some platforms */
#include <netinet/in.h> /* Needed on some platforms */
#include <netinet/if_ether.h>