From: Vsevolod Stakhov Date: Sun, 6 Jan 2013 13:32:45 +0000 (+0400) Subject: Fix for old libevent. X-Git-Tag: 0.5.4~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d63fed447d8b74d81468a57af9773773f654210;p=thirdparty%2Frspamd.git Fix for old libevent. --- diff --git a/src/webui.c b/src/webui.c index 92b8c601c1..05c64fc1d0 100644 --- a/src/webui.c +++ b/src/webui.c @@ -225,7 +225,11 @@ http_calculate_content_length (struct evbuffer *evb, struct evhttp_request *req) { gchar numbuf[64]; +#if _EVENT_NUMERIC_VERSION > 0x02000000 rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evbuffer_get_length (evb)); +#else + rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evb->totallen); +#endif evhttp_add_header(req->output_headers, "Content-Length", numbuf); }