From cdd52e7f81b340bb8386bb4cf3303331eb709bb6 Mon Sep 17 00:00:00 2001 From: Jiri Luznicky Date: Wed, 23 May 2018 15:39:13 +0200 Subject: [PATCH] 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 (cherry picked from commit 95918754d2ba7e6bffe0fc74bebed60bd917c10c) --- buffer.c | 1 + event-internal.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/buffer.c b/buffer.c index 80cb54ad..8e88fdf5 100644 --- a/buffer.c +++ b/buffer.c @@ -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 diff --git a/event-internal.h b/event-internal.h index 03eb2a87..92941b71 100644 --- a/event-internal.h +++ b/event-internal.h @@ -368,6 +368,10 @@ struct event_config { }; /* Internal use only: Functions that might be missing from */ +#ifndef LIST_END +#define LIST_END(head) NULL +#endif + #ifndef TAILQ_FIRST #define TAILQ_FIRST(head) ((head)->tqh_first) #endif -- 2.40.0