Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/dload.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-02 12:29:29 -0500
committerDan McGee <dan@archlinux.org>2010-09-02 12:30:36 -0500
commit3e7b90ff6950d1efe2aa8c16b8031b05fbe2f310 (patch)
tree0a84c765945c7035a0571b1c7bec0582f39d8288 /lib/libalpm/dload.c
parenteba521913d68da16cdd18d5e996c00c554408272 (diff)
Clean up libfetch checking in configure
Model it after the new OpenSSL check, and have it be a bit more useful. If you do not explicitly pass a command line option, it will be linked if available but will not error out if it is missing. Also bump the version to that where connection caching was introduced as we use these new features in the codebase. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/dload.c')
-rw-r--r--lib/libalpm/dload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 3185d2aa..32096e24 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -38,7 +38,7 @@
#include <sys/param.h> /* MAXHOSTNAMELEN */
#endif
-#if defined(INTERNAL_DOWNLOAD)
+#ifdef HAVE_FETCH
#include <fetch.h>
#endif
@@ -58,7 +58,7 @@ static char *get_filename(const char *url) {
return(filename);
}
-#if defined(INTERNAL_DOWNLOAD)
+#ifdef HAVE_FETCH
static char *get_destfile(const char *path, const char *filename) {
char *destfile;
/* len = localpath len + filename len + null */
@@ -338,7 +338,7 @@ cleanup:
static int download(const char *url, const char *localpath,
int force) {
if(handle->fetchcb == NULL) {
-#if defined(INTERNAL_DOWNLOAD)
+#ifdef HAVE_FETCH
return(download_internal(url, localpath, force));
#else
RET_ERR(PM_ERR_EXTERNAL_DOWNLOAD, -1);