summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-17 01:25:35 +0100
committerDan McGee <dan@archlinux.org>2011-03-17 01:25:35 +0100
commitcff36093f3b778b3bda9c9d1a3acf24e36dd9f73 (patch)
tree2095bf581d9c12d5b0a61796359a5b40928f3630 /lib/libalpm/error.c
parent92630c660710332d0e02dea5a3c06c48f75d7321 (diff)
parentf2eac18a6ec62db3ec53744064e05416024c1b30 (diff)
downloadpacman-cff36093f3b778b3bda9c9d1a3acf24e36dd9f73.tar.gz
pacman-cff36093f3b778b3bda9c9d1a3acf24e36dd9f73.tar.xz
Merge branch 'download'
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 21fbb48f..cf98cc75 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -20,21 +20,14 @@
#include "config.h"
-/* TODO: needed for the libfetch stuff, unfortunately- we should kill it */
-#include <stdio.h>
-/* the following two are needed for FreeBSD's libfetch */
-#include <limits.h> /* PATH_MAX */
-#if defined(HAVE_SYS_PARAM_H)
-#include <sys/param.h> /* MAXHOSTNAMELEN */
-#endif
-
-#ifdef HAVE_LIBFETCH
-#include <fetch.h> /* fetchLastErrString */
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
#endif
/* libalpm */
#include "util.h"
#include "alpm.h"
+#include "handle.h"
const char SYMEXPORT *alpm_strerrorlast(void)
{
@@ -147,9 +140,9 @@ const char SYMEXPORT *alpm_strerror(int err)
* requires the archive struct, so we can't. Just use a generic
* error string instead. */
return _("libarchive error");
- case PM_ERR_LIBFETCH:
-#ifdef HAVE_LIBFETCH
- return fetchLastErrString;
+ case PM_ERR_LIBCURL:
+#ifdef HAVE_LIBCURL
+ return(curl_easy_strerror(handle->curlerr));
#else
/* obviously shouldn't get here... */
return _("download library error");