From: Roy Marples Date: Mon, 10 Nov 2014 16:56:32 +0000 (+0000) Subject: TAILQ is now inlcuded via config.h either via sys/queue.h or compat/queue.h. X-Git-Tag: v6.6.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc09d81de28883995da42e6de2640648275df151;p=thirdparty%2Fdhcpcd.git TAILQ is now inlcuded via config.h either via sys/queue.h or compat/queue.h. This allows dhcpcd to compile on systems that do not even supply sys/queue.h, such as the musl C library. Thanks to Juan RP. --- diff --git a/auth.c b/auth.c index 81817848..9c2bb9cc 100644 --- a/auth.c +++ b/auth.c @@ -26,7 +26,6 @@ */ #include -#include #include #include #include diff --git a/auth.h b/auth.h index 848569f6..cb4aa71d 100644 --- a/auth.h +++ b/auth.h @@ -28,7 +28,7 @@ #ifndef AUTH_H #define AUTH_H -#include +#include "config.h" #define DHCPCD_AUTH_SEND (1 << 0) #define DHCPCD_AUTH_REQUIRE (1 << 1) diff --git a/common.c b/common.c index b90027aa..705bcb02 100644 --- a/common.c +++ b/common.c @@ -31,7 +31,9 @@ #endif #ifndef __sun +# if !defined(__linux__) || (defined(__linux__) && defined(__GLIBC__)) # include +# endif #endif #ifdef __APPLE__ diff --git a/compat/queue.h b/compat/queue.h index ef6a3b82..99ac6b94 100644 --- a/compat/queue.h +++ b/compat/queue.h @@ -34,7 +34,6 @@ #ifndef COMPAT_QUEUE_H #define COMPAT_QUEUE_H -#include /* * Tail queue definitions. */ diff --git a/configure b/configure index b64d0725..59d2eddc 100755 --- a/configure +++ b/configure @@ -687,6 +687,8 @@ EOF fi if [ "$TAILQ_FOREACH_SAFE" = no -o "$TAILQ_CONCAT" = no ]; then echo "#include \"compat/queue.h\"">>$CONFIG_H +else + echo "#include " >>$CONFIG_H fi if [ -z "$POSIX_SPAWN" ]; then diff --git a/dhcpcd.c b/dhcpcd.c index 2587dd7c..c4455b33 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -30,7 +30,6 @@ const char dhcpcd_copyright[] = "Copyright (c) 2006-2014 Roy Marples"; #define _WITH_DPRINTF /* Stop FreeBSD bitching */ #include -#include #include #include #include diff --git a/dhcpcd.h b/dhcpcd.h index 45b0d021..3ee1699b 100644 --- a/dhcpcd.h +++ b/dhcpcd.h @@ -28,10 +28,10 @@ #ifndef DHCPCD_H #define DHCPCD_H -#include #include #include +#include "config.h" #include "defs.h" #include "control.h" #include "if-options.h" diff --git a/eloop.c b/eloop.c index e5b14a5e..61a8eb35 100644 --- a/eloop.c +++ b/eloop.c @@ -28,7 +28,6 @@ /* Needed for ppoll(2) */ #define _GNU_SOURCE -#include #include #include @@ -38,6 +37,7 @@ #include #include +#include "config.h" #include "common.h" #include "dhcpcd.h" #include "eloop.h" diff --git a/if-options.c b/if-options.c index de7eeb29..dc7162f0 100644 --- a/if-options.c +++ b/if-options.c @@ -29,7 +29,6 @@ #include #include -#include #include diff --git a/ipv4.c b/ipv4.c index 7d2b99fc..ddb1c973 100644 --- a/ipv4.c +++ b/ipv4.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include #include #include diff --git a/ipv6.h b/ipv6.h index 0d1025b0..6864bce6 100644 --- a/ipv6.h +++ b/ipv6.h @@ -28,7 +28,6 @@ #ifndef IPV6_H #define IPV6_H -#include #include #include @@ -38,6 +37,7 @@ # include #endif +#include "config.h" #include "dhcpcd.h" #define ALLROUTERS "ff02::2" diff --git a/ipv6nd.h b/ipv6nd.h index 4d518008..7538f360 100644 --- a/ipv6nd.h +++ b/ipv6nd.h @@ -28,10 +28,9 @@ #ifndef IPV6ND_H #define IPV6ND_H -#include - #include +#include "config.h" #include "dhcpcd.h" #include "ipv6.h"