summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-27 12:26:46 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-27 12:26:46 (EST)
commitdd36f3cc97446d704474366e711fa0cc6ffe0917 (patch)
treef9791e612775fb3af0b9e3d5535a1e5276f2daff /libopkg/opkg.c
parent47daab916286d7ac837ecaadb607b09797822fc2 (diff)
adding --enable-curl configuation to configure.ac
Basically it apply opkg_wget.patch from OE but I add something to the configure.ac http://cgit.openembedded.net/cgit.cgi?url=openembedded/tree/packages/opkg/files/opkg_wget.patch&id=1bbdc74a5384c81d0bdeb96f6acdfef91430d35d Thanks Mike Westerhof <mwester@dls.net> git-svn-id: http://opkg.googlecode.com/svn/trunk@191 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg.c')
-rw-r--r--libopkg/opkg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopkg/opkg.c b/libopkg/opkg.c
index 521072d..d69721b 100644
--- a/libopkg/opkg.c
+++ b/libopkg/opkg.c
@@ -1018,7 +1018,9 @@ opkg_find_package (opkg_t *opkg, const char *name, const char *ver, const char *
return package;
}
+#ifdef HAVE_CURL
#include <curl/curl.h>
+#endif
/**
* @brief Check the accessibility of repositories. It will try to access the repository to check if the respository is accessible throught current network status.
* @param opkg The opkg_t
@@ -1068,12 +1070,16 @@ int opkg_repository_accessibility_check(opkg_t *opkg)
repositories--;
err = opkg_download(opkg->conf, iter1->data, "/dev/null", NULL, NULL);
+#ifdef HAVE_CURL
if (!(err == CURLE_OK ||
err == CURLE_HTTP_RETURNED_ERROR ||
err == CURLE_FILE_COULDNT_READ_FILE ||
err == CURLE_REMOTE_FILE_NOT_FOUND ||
err == CURLE_TFTP_NOTFOUND
)) {
+#else
+ if (!(err == 0)) {
+#endif
ret++;
}
str_list_elt_deinit(iter1);