From 93b7bcd9335071c85d0353d541d4ff72743333ea Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Wed, 20 Nov 2013 10:24:49 -0500 Subject: opkg_download: Drop config check from header The function 'opkg_curl_cleanup' is unconditionally defined in the header and is implemented as an empty stub in the source file if curl is not enabled. This allows us to present a consistent API regardless of the configure options used to build opkg. Signed-off-by: Paul Barker Cc: Carsten Schoenert --- (limited to 'libopkg/opkg_download.c') diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index e53e64e..cda5ae8 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -555,14 +555,16 @@ end: #endif -#ifdef HAVE_CURL void opkg_curl_cleanup(void){ +#ifdef HAVE_CURL if(curl != NULL){ curl_easy_cleanup (curl); curl = NULL; } +#endif } +#ifdef HAVE_CURL static CURL * opkg_curl_init(curl_progress_func cb, void *data) { -- cgit v0.9.1