From 271e2c29e1d75c0f12dd3083bd69e40c62f62aa1 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 24 Aug 2014 14:51:41 +0200 Subject: [PATCH] Add some libevent 1 compability --- src/daap_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/daap_cache.c b/src/daap_cache.c index 5193018c..cd61c1cd 100644 --- a/src/daap_cache.c +++ b/src/daap_cache.c @@ -306,8 +306,13 @@ daapcache_reply_add(const char *query, struct evbuffer *evbuf) size_t datlen; int ret; +#ifdef HAVE_LIBEVENT2 datlen = evbuffer_get_length(evbuf); data = evbuffer_pullup(evbuf, -1); +#else + datlen = EVBUFFER_LENGTH(evbuf); + data = EVBUFFER_DATA(evbuf); +#endif ret = sqlite3_prepare_v2(g_db_hdl, Q_TMPL, -1, &stmt, 0); if (ret != SQLITE_OK)