From 2828bdb980d0118a1076d3ddbbf47b77dd96bba2 Mon Sep 17 00:00:00 2001 From: Christopher Wiley Date: Fri, 24 Jul 2015 08:42:06 -0700 Subject: [PATCH] Always define missing TAILQ functions from sys/queue.h 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/event-internal.h b/event-internal.h index 3bc79c72..bf164cd5 100644 --- a/event-internal.h +++ b/event-internal.h @@ -368,7 +368,6 @@ struct event_config { }; /* Internal use only: Functions that might be missing from */ -#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)