From 9e4a9c51cc23156df5113e5ded9529650193a590 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 27 Nov 2024 10:37:45 +0000 Subject: [PATCH] Use evbuffer_readline if readln is not available. It doesn't work properly but at least it builds. --- compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compat.h b/compat.h index f33dcf1a..93928603 100644 --- a/compat.h +++ b/compat.h @@ -38,6 +38,14 @@ #include #else #include +#ifndef EVBUFFER_EOL_LF +/* + * This doesn't really work because evbuffer_readline is broken, but gets us to + * build with very old (older than 1.4.14) libevent. + */ +#define EVBUFFER_EOL_LF +#define evbuffer_readln(a, b, c) evbuffer_readline(a) +#endif #endif #ifdef HAVE_MALLOC_TRIM