aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2015-11-14 13:54:21 +0000
committerGregory Maxwell <greg@xiph.org>2015-11-16 09:21:54 +0000
commitaee22bf2886acd3151992c42f7c0ca5f2aae3fdf (patch)
tree67482439c3623b129721dda7eb79684751100594 /src/httpserver.cpp
parentb632145edeb376b4d1597f192ca00634f7d2866c (diff)
Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN.
This uses _EVENT_LOG_WARN instead, which appears to be defined in the old versions of libevent that I have on some systems.
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 424ef015c8..52f5675e85 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -365,6 +365,10 @@ static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue)
/** libevent event log callback */
static void libevent_log_cb(int severity, const char *msg)
{
+#ifndef EVENT_LOG_WARN
+// EVENT_LOG_WARN was added in 2.0.19; but before then _EVENT_LOG_WARN existed.
+# define EVENT_LOG_WARN _EVENT_LOG_WARN
+#endif
if (severity >= EVENT_LOG_WARN) // Log warn messages and higher without debug category
LogPrintf("libevent: %s\n", msg);
else