Signed-off-by: Dave Reisner <[email protected]>
---
 lib/libalpm/alpm.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 3f9cfff..44c513e 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -27,6 +27,9 @@
 #ifdef HAVE_LIBFETCH
 #include <fetch.h>
 #endif
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
 
 /* libalpm */
 #include "alpm.h"
@@ -63,6 +66,10 @@ int SYMEXPORT alpm_initialize(void)
        fetchConnectionCacheInit(5, 1);
 #endif
 
+#ifdef HAVE_LIBCURL
+       curl_global_init(CURL_GLOBAL_NOTHING);
+#endif
+
        return(0);
 }
 
@@ -86,6 +93,10 @@ int SYMEXPORT alpm_release(void)
        fetchConnectionCacheClose();
 #endif
 
+#ifdef HAVE_LIBCURL
+       curl_global_cleanup();
+#endif
+
        return(0);
 }
 
-- 
1.7.3.4


Reply via email to