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.
This commit is contained in:
Roy Marples 2014-11-10 16:56:32 +00:00
parent 76dc9cd65d
commit bc09d81de2
12 changed files with 9 additions and 11 deletions

1
auth.c
View File

@ -26,7 +26,6 @@
*/
#include <sys/file.h>
#include <sys/queue.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>

2
auth.h
View File

@ -28,7 +28,7 @@
#ifndef AUTH_H
#define AUTH_H
#include <sys/queue.h>
#include "config.h"
#define DHCPCD_AUTH_SEND (1 << 0)
#define DHCPCD_AUTH_REQUIRE (1 << 1)

View File

@ -31,7 +31,9 @@
#endif
#ifndef __sun
# if !defined(__linux__) || (defined(__linux__) && defined(__GLIBC__))
# include <sys/cdefs.h>
# endif
#endif
#ifdef __APPLE__

View File

@ -34,7 +34,6 @@
#ifndef COMPAT_QUEUE_H
#define COMPAT_QUEUE_H
#include <sys/queue.h>
/*
* Tail queue definitions.
*/

2
configure vendored
View File

@ -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 <sys/queue.h>" >>$CONFIG_H
fi
if [ -z "$POSIX_SPAWN" ]; then

View File

@ -30,7 +30,6 @@ const char dhcpcd_copyright[] = "Copyright (c) 2006-2014 Roy Marples";
#define _WITH_DPRINTF /* Stop FreeBSD bitching */
#include <sys/file.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>

View File

@ -28,10 +28,10 @@
#ifndef DHCPCD_H
#define DHCPCD_H
#include <sys/queue.h>
#include <sys/socket.h>
#include <net/if.h>
#include "config.h"
#include "defs.h"
#include "control.h"
#include "if-options.h"

View File

@ -28,7 +28,6 @@
/* Needed for ppoll(2) */
#define _GNU_SOURCE
#include <sys/queue.h>
#include <sys/time.h>
#include <errno.h>
@ -38,6 +37,7 @@
#include <stdlib.h>
#include <syslog.h>
#include "config.h"
#include "common.h"
#include "dhcpcd.h"
#include "eloop.h"

View File

@ -29,7 +29,6 @@
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <arpa/inet.h>

1
ipv4.c
View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/types.h>

2
ipv6.h
View File

@ -28,7 +28,6 @@
#ifndef IPV6_H
#define IPV6_H
#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@ -38,6 +37,7 @@
# include <linux/ipv6.h>
#endif
#include "config.h"
#include "dhcpcd.h"
#define ALLROUTERS "ff02::2"

View File

@ -28,10 +28,9 @@
#ifndef IPV6ND_H
#define IPV6ND_H
#include <sys/queue.h>
#include <time.h>
#include "config.h"
#include "dhcpcd.h"
#include "ipv6.h"