changeset 2433:2b09f54de034 draft

Fix compat/queue.h
author Roy Marples <roy@marples.name>
date Wed, 23 Apr 2014 20:29:03 +0000
parents 17c34675baab
children 58c54320c5a6
files compat/queue.h dhcpcd.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/compat/queue.h	Wed Apr 23 20:09:20 2014 +0000
+++ b/compat/queue.h	Wed Apr 23 20:29:03 2014 +0000
@@ -33,9 +33,15 @@
 
 #ifndef COMPAT_QUEUE_H
 #define COMPAT_QUEUE_H
+
+#include <sys/queue.h>
 /*
  * Tail queue definitions.
  */
+#ifndef TAILQ_END
+#define	TAILQ_END(head)			(NULL)
+#endif
+
 #ifndef TAILQ_HEAD
 #define	_TAILQ_HEAD(name, type, qual)					\
 struct name {								\
@@ -58,7 +64,6 @@
  * Tail queue access methods.
  */
 #define	TAILQ_FIRST(head)		((head)->tqh_first)
-#define	TAILQ_END(head)			(NULL)
 #define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
 #define	TAILQ_LAST(head, headname) \
 	(*(((struct headname *)((head)->tqh_last))->tqh_last))
--- a/dhcpcd.c	Wed Apr 23 20:09:20 2014 +0000
+++ b/dhcpcd.c	Wed Apr 23 20:29:03 2014 +0000
@@ -30,6 +30,7 @@
 #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>