From aee22bf2886acd3151992c42f7c0ca5f2aae3fdf Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sat, 14 Nov 2015 13:54:21 +0000 Subject: 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. --- src/httpserver.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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* 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 -- cgit v1.2.3