summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/alpm.h1
-rw-r--r--lib/libalpm/error.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 0f3b7166..0b80506f 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -535,6 +535,7 @@ enum _pmerrno_t {
/* External library errors */
PM_ERR_LIBARCHIVE,
PM_ERR_LIBFETCH,
+ PM_ERR_LIBCURL,
PM_ERR_EXTERNAL_DOWNLOAD
};
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index aec97a1f..19c7d92c 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -39,6 +39,7 @@
/* libalpm */
#include "util.h"
#include "alpm.h"
+#include "handle.h"
const char SYMEXPORT *alpm_strerrorlast(void)
{
@@ -158,6 +159,13 @@ const char SYMEXPORT *alpm_strerror(int err)
/* obviously shouldn't get here... */
return _("download library error");
#endif
+ case PM_ERR_LIBCURL:
+#ifdef HAVE_LIBCURL
+ return(curl_easy_strerror(handle->curlerr));
+#else
+ /* obviously shouldn't get here... */
+ return _("download library error");
+#endif
case PM_ERR_EXTERNAL_DOWNLOAD:
return _("error invoking external downloader");
/* Unknown error! */