]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on QNX. Thanks to Will Miles.
authorRoy Marples <roy@marples.name>
Sat, 20 Dec 2014 14:11:38 +0000 (14:11 +0000)
committerRoy Marples <roy@marples.name>
Sat, 20 Dec 2014 14:11:38 +0000 (14:11 +0000)
configure
if.c
ipv6.c

index f250d0181e7340b4bea63cca4fd0fa021e80e2a6..8bad7d8f54858eccd5f2226107526a2eb6f44237 100755 (executable)
--- a/configure
+++ b/configure
@@ -506,6 +506,9 @@ if $XCC _inet_ntoa.c -o _inet_ntoa 2>&3; then
 elif $XCC _inet_ntoa.c -lnsl -o _inet_ntoa 2>&3; then
        echo "yes (-lnsl)"
        echo "LDADD+=           -lnsl" >>$CONFIG_MK
+elif $XCC _inet_ntoa.c -lsocket -o _inet_ntoa 2>&3; then
+       echo "yes (-lsocket)"
+       echo "LDADD+=           -lsocket" >>$CONFIG_MK  
 else
        echo "no"
        echo "libc support for inet_ntoa is required - aborting" >&2
diff --git a/if.c b/if.c
index 419064471a40704bd70b70bb668b58caab75f9ef..2bbb4f6ceecf1907f3025785df91cf55056b100a 100644 (file)
--- a/if.c
+++ b/if.c
 #include "ipv4.h"
 #include "ipv6nd.h"
 
+#ifdef __QNX__
+/* QNX carries defines for, but does not actually support PF_LINK */
+#undef IFLR_ACTIVE
+#endif
+
 void
 if_free(struct interface *ifp)
 {
diff --git a/ipv6.c b/ipv6.c
index 6744140b10064330a07931c679e73c85562c16ad..0ae873a3b30054457843cde485099c89254c88eb 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
 #    define IN6_IFF_DUPLICATED 0x08
 #  endif
 #  define IN6_IFF_DETACHED     0
-#else
-#  include <sys/endian.h>
+#else /* !__linux__ */
+#  ifndef __QNX__
+#    include <sys/endian.h>
+#  endif
 #  include <net/if.h>
-#ifdef __FreeBSD__ /* Needed so that including netinet6/in6_var.h works */
-#  include <net/if_var.h>
-#endif
-#ifndef __sun
-#  include <netinet6/in6_var.h>
-#endif
+#  ifdef __FreeBSD__ /* Needed so that including netinet6/in6_var.h works */
+#    include <net/if_var.h>
+#  endif
+#  ifndef __sun
+#    include <netinet6/in6_var.h>
+#  endif
 #endif
 
 #include <errno.h>