1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-11-06 00:42:59 +00:00

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().
This commit is contained in:
Alexander Barton
2011-11-06 14:16:59 +01:00
parent a7911e35af
commit 13d9e0c5a7
2 changed files with 9 additions and 3 deletions

View File

@@ -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