]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fixup commit 604cd4a for OpenIndiana.
authorDenis Ovsienko <[email protected]>
Mon, 16 Aug 2021 22:47:07 +0000 (23:47 +0100)
committerDenis Ovsienko <[email protected]>
Wed, 29 Sep 2021 14:11:01 +0000 (15:11 +0100)
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

(cherry picked from commit 4f1a63c4c3b109d14b4df003baa85cbc373c82f6)

addrtoname.c
print-sll.c

index eb3df77ee7ea2ebad9e6591075013ecac3cde691..34e2ff47e3990cee691a45aeae76924b32801018 100644 (file)
     #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>
index 19d2973edadec81cc1ad0fa18c25eb0ba96e2e03..eb8d620a448b6806e011ee2bd4eb2b6a7c2d5a4e 100644 (file)
 #endif
 
 #ifdef HAVE_NET_IF_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>
 #endif