]> granicus.if.org Git - libevent/commitdiff
Always define missing TAILQ functions from sys/queue.h
authorChristopher Wiley <wiley@google.com>
Fri, 24 Jul 2015 15:42:06 +0000 (08:42 -0700)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 25 Aug 2015 20:00:20 +0000 (23:00 +0300)
On both Android and Ubuntu machines, TAILQ_END is not defined.  This
header also does not seem to be part of standard BSD sys/queue.h

Fix this by always defining missing TAILQ_ macros rather than
conditioning on a particular macro.

Fixes #267

event-internal.h

index 3bc79c72ffaa58312b2b1716424686881a0b08d3..bf164cd57087a7aebe71c08154c1361c866f7704 100644 (file)
@@ -368,7 +368,6 @@ struct event_config {
 };
 
 /* Internal use only: Functions that might be missing from <sys/queue.h> */
-#if defined(EVENT__HAVE_SYS_QUEUE_H) && !defined(EVENT__HAVE_TAILQFOREACH)
 #ifndef TAILQ_FIRST
 #define        TAILQ_FIRST(head)               ((head)->tqh_first)
 #endif
@@ -394,7 +393,6 @@ struct event_config {
        (listelm)->field.tqe_prev = &(elm)->field.tqe_next;             \
 } while (0)
 #endif
-#endif /* TAILQ_FOREACH */
 
 #define N_ACTIVE_CALLBACKS(base)                                       \
        ((base)->event_count_active)