about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-11-06 14:16:59 +0100
committerAlexander Barton <alex@barton.de>2011-11-06 14:16:59 +0100
commit13d9e0c5a7e03559a2b5bf405b526098b15bd0e6 (patch)
tree2579f0be10cb61313283e194e38819b5a815afad /src
parenta7911e35afce4de5f387f9dae0f414ae35006b25 (diff)
downloadngircd-13d9e0c5a7e03559a2b5bf405b526098b15bd0e6.tar.gz
ngircd-13d9e0c5a7e03559a2b5bf405b526098b15bd0e6.zip
Test for gai_strerror()
If gai_strerror() isn't available, use a macro that simply returns
a static error message (regardless of the real error code).

For example, GNU libc 2.0.7 doesn't implement gai_strerror().
Diffstat (limited to 'src')
-rw-r--r--src/portab/portab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/portab/portab.h b/src/portab/portab.h
index a75aa34d..90f36a0e 100644
--- a/src/portab/portab.h
+++ b/src/portab/portab.h
@@ -164,6 +164,10 @@ extern char * strtok_r PARAMS((char *str, const char *delim, char **saveptr));
 extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list args ));
 #endif
 
+#ifndef HAVE_GAI_STRERROR
+#define gai_strerror(r) "unknown error"
+#endif
+
 #ifndef PACKAGE_NAME
 #define PACKAGE_NAME PACKAGE
 #endif