summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 4f95832d..e5b47444 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -23,6 +23,10 @@
#include "config.h"
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
+
/* connection caching setup */
#ifdef HAVE_LIBFETCH
#include <fetch.h>
@@ -69,6 +73,11 @@ int SYMEXPORT alpm_initialize(void)
fetchConnectionCacheInit(5, 1);
#endif
+#ifdef HAVE_LIBCURL
+ curl_global_init(CURL_GLOBAL_SSL);
+ handle->curl = curl_easy_init();
+#endif
+
return(0);
}
@@ -92,6 +101,10 @@ int SYMEXPORT alpm_release(void)
fetchConnectionCacheClose();
#endif
+#ifdef HAVE_LIBCURL
+ curl_global_cleanup();
+#endif
+
return(0);
}