similar to Linux.
While here, add IN_IFF_* counter-parts in ipv4.h.
>>$CONFIG_MK
echo "DHCPCD_SRCS+= if-sun.c" >>$CONFIG_MK
echo "LDADD+= -ldlpi" >>$CONFIG_MK
-
- # IPv6 won't work, but it will at least compile.
- echo "CPPFLAGS+= -DIN6_IFF_DETACHED=0" >>$CONFIG_MK
- echo "CPPFLAGS+= -DIN6_IFF_TENTATIVE=0" >>$CONFIG_MK
- echo "CPPFLAGS+= -DIN6_IFF_DUPLICATED=0" >>$CONFIG_MK
;;
*)
echo "DHCPCD_SRCS+= if-bsd.c" >>$CONFIG_MK
#include "dhcpcd.h"
+#ifdef __sun
+ /* Solaris lacks these defines.
+ * While it supports DaD, to seems to only expose IFF_DUPLICATE
+ * so we have no way of knowing if it's tentative or not.
+ * I don't even know if Solaris has any special treatment for tentative. */
+# define IN_IFF_TENTATIVE 0
+# define IN_IFF_DUPLICATED 0x02
+# define IN_IFF_DETACHED 0
+#endif
+
#ifdef IN_IFF_TENTATIVE
#define IN_IFF_NOTUSEABLE \
(IN_IFF_TENTATIVE | IN_IFF_DUPLICATED | IN_IFF_DETACHED)
# endif
#endif
+#ifdef __sun
+ /* Solaris lacks these defines.
+ * While it supports DaD, to seems to only expose IFF_DUPLICATE
+ * so we have no way of knowing if it's tentative or not.
+ * I don't even know if Solaris has any special treatment for tentative. */
+# define IN6_IFF_TENTATIVE 0
+# define IN6_IFF_DUPLICATED 0x04
+# define IN6_IFF_DETACHED 0
+#endif
+
#define ALLROUTERS "ff02::2"
#define EUI64_GBIT 0x01