Skip to content

Commit

Permalink
Fix missing LIST_HEAD
Browse files Browse the repository at this point in the history
Despite the presence of 'sys/queue.h' in some stdlib implementations
(i.e. uclibc) 'LIST_HEAD' macro can be missing.  This fix defines this
macro in the same manner as was done previously for 'TAILQ_'.

Fixes: libevent#539
Closes: libevent#639 (cherry-picked)
Backport: 2.1.9
  • Loading branch information
Jiri Luznicky authored and azat committed Oct 20, 2018
1 parent 4c61a04 commit 9591875
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
#include "evthread-internal.h"
#include "evbuffer-internal.h"
#include "bufferevent-internal.h"
#include "event-internal.h"

/* some systems do not have MAP_FAILED */
#ifndef MAP_FAILED
Expand Down
4 changes: 4 additions & 0 deletions event-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ struct event_config {
};

/* Internal use only: Functions that might be missing from <sys/queue.h> */
#ifndef LIST_END
#define LIST_END(head) NULL
#endif

#ifndef TAILQ_FIRST
#define TAILQ_FIRST(head) ((head)->tqh_first)
#endif
Expand Down

0 comments on commit 9591875

Please sign in to comment.