Skip to content

Commit dafefb7

Browse files
committed
Merge pull request #7016
aee22bf Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN. (Gregory Maxwell)
2 parents 6876a78 + aee22bf commit dafefb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/httpserver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue)
365365
/** libevent event log callback */
366366
static void libevent_log_cb(int severity, const char *msg)
367367
{
368+
#ifndef EVENT_LOG_WARN
369+
// EVENT_LOG_WARN was added in 2.0.19; but before then _EVENT_LOG_WARN existed.
370+
# define EVENT_LOG_WARN _EVENT_LOG_WARN
371+
#endif
368372
if (severity >= EVENT_LOG_WARN) // Log warn messages and higher without debug category
369373
LogPrintf("libevent: %s\n", msg);
370374
else

0 commit comments

Comments
 (0)