mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
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
This commit is contained in:
parent
fd36647af1
commit
2828bdb980
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user