Fix missing LIST_HEAD

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: #539
Closes: #639 (cherry-picked)
Backport: 2.1.9
This commit is contained in:
Jiri Luznicky 2018-05-23 15:39:13 +02:00 committed by Azat Khuzhin
parent 4c61a04cd5
commit 95918754d2
No known key found for this signature in database
GPG Key ID: B86086848EF8686D
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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