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)
#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>
#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