]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove Solaris IN6_IFF_* defines from configure and add the to ipv6.h,
authorRoy Marples <roy@marples.name>
Tue, 26 Jul 2016 21:09:35 +0000 (21:09 +0000)
committerRoy Marples <roy@marples.name>
Tue, 26 Jul 2016 21:09:35 +0000 (21:09 +0000)
similar to Linux.
While here, add IN_IFF_* counter-parts in ipv4.h.

configure
ipv4.h
ipv6.h

index 755e29cf4d6538e62963f2b5a81723b85755c04f..0f22c8694c3755d79be9f74535ccbb3b3e744afe 100755 (executable)
--- a/configure
+++ b/configure
@@ -416,11 +416,6 @@ sunos*)
            >>$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
diff --git a/ipv4.h b/ipv4.h
index 66425f88c61415bd412022c8545d688fb4b5ade0..f10eff33b217b45e88d4cdf1c020f6e422fb1ff7 100644 (file)
--- a/ipv4.h
+++ b/ipv4.h
 
 #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)
diff --git a/ipv6.h b/ipv6.h
index 5d7285c3d14e7da26d937507173fcca46546b9a1..94033032db403a53ed580a0c5b9893fb19ad2f08 100644 (file)
--- a/ipv6.h
+++ b/ipv6.h
 #  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