aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-06 10:49:40 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-06 10:49:40 +0000
commit6f74820cfc2319ebd5b52ebfbe90a7ba612923c7 (patch)
tree47a8db6fb139bd9d7689be65b9af9d304b75a851 /lib
parentaf72f198ba486858d0794e272bb090b50db04a57 (diff)
if no strerror_r prototype is found, we provide our own to prevent picky
compilers to warn
Diffstat (limited to 'lib')
-rw-r--r--lib/strerror.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/strerror.c b/lib/strerror.c
index 6cc87091b..d5c80d1a6 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -32,6 +32,15 @@
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
+#ifdef HAVE_NO_STRERROR_R_DECL
+#ifdef HAVE_POSIX_STRERROR_R
+/* seen on AIX 5100-02 gcc 2.9 */
+extern int strerror_r(int errnum, char *strerrbuf, size_t buflen);
+#else
+extern char *strerror_r(int errnum, char *buf, size_t buflen);
+#endif
+#endif
+
const char *
curl_easy_strerror(CURLcode error)
{