]> granicus.if.org Git - libevent/commitdiff
Fix missing LIST_HEAD
authorJiri Luznicky <jiri.luznicky@ubnt.com>
Wed, 23 May 2018 13:39:13 +0000 (15:39 +0200)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:17:59 +0000 (15:17 +0300)
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
event-internal.h

index 80cb54ad01545d5f30d983b9c390b4cc991b3158..8e88fdf54d8dd8020278d9c25a6161faceb22a7a 100644 (file)
--- 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
index 03eb2a87415747e2ab4b2b37201335d50d118709..92941b71364abe29becc0d99d4a98834f98d3482 100644 (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