summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-12-16 01:57:31 +0100
committerDave Reisner <d@falconindy.com>2011-03-09 21:22:32 +0100
commit75bfe825fc4018173b0d7a3c4029094edb52d93a (patch)
tree13cce74fdc6cf94e09477f3782053d7592fe750b /lib/libalpm
parent67391c2c6cfa0044f554fb6a6b9717175d8d83a3 (diff)
downloadpacman-75bfe825fc4018173b0d7a3c4029094edb52d93a.tar.gz
pacman-75bfe825fc4018173b0d7a3c4029094edb52d93a.tar.xz
add curl to alpm initialization and teardown routines
Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.c13
-rw-r--r--lib/libalpm/dload.c4
-rw-r--r--lib/libalpm/error.c4
3 files changed, 21 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);
}
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 7a98eb12..afe0dd40 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -35,6 +35,10 @@
#include <sys/param.h> /* MAXHOSTNAMELEN */
#endif
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
+
#ifdef HAVE_LIBFETCH
#include <fetch.h>
#endif
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 21fbb48f..aec97a1f 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -28,6 +28,10 @@
#include <sys/param.h> /* MAXHOSTNAMELEN */
#endif
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
+
#ifdef HAVE_LIBFETCH
#include <fetch.h> /* fetchLastErrString */
#endif