]> granicus.if.org Git - libevent/commit
Fix event_dlist definition when sys/queue not included
authorDerrick Pallas <derrick@pallas.us>
Sat, 10 Nov 2012 19:22:15 +0000 (11:22 -0800)
committerDerrick Pallas <derrick@pallas.us>
Sat, 10 Nov 2012 19:28:46 +0000 (11:28 -0800)
commit81b6209e10f7325de0b533bcbc256caddfe1f209
treeaf4fa2377598faeb86e8b3cc735df0fd4a3b644e
parent64051b903ac90894642f5c0b154fd912d35104d1
Fix event_dlist definition when sys/queue not included

This header adds TAILQ_HEAD and TAILQ_ENTRY if sys/queue is not included.
There is a similar macro that adds LIST_ENTRY but not LIST_HEAD, even though
LIST_HEAD is used later.

This change pulls in the correct definition (swiped from sys/queue) for
LIST_HEAD and cleans up the one spot where it is used.  The change can be
tested by adding

#undef LIST_HEAD
#undef LIST_ENTRY

right before the #ifndef checks and removing

#define EVENT_DEFINED_LISTENTRY_
#define EVENT_DEFINED_LISTHEAD_

so that the macros persist later.
include/event2/event_struct.h