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.
This commit is contained in:
Gregory Maxwell 2015-11-14 13:54:21 +00:00 committed by Jack Grigg
parent c922edd00f
commit 599d2c4034
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
1 changed files with 4 additions and 0 deletions

View File

@ -323,6 +323,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