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)