summaryrefslogtreecommitdiff
path: root/lib/gai_strerror.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-06-16 20:01:56 +0200
committerAndy Wingo <wingo@pobox.com>2011-06-16 20:01:56 +0200
commit99cc1092a89292c6e6db2db537988e5963b19868 (patch)
tree94f69d35c6328c2ab83304d8996a2dd957cac529 /lib/gai_strerror.c
parent46da7909e1f67c13284730344e971d293df890c0 (diff)
parent32f94bf258bd032fa6f96fc76e4153086bc001f5 (diff)
downloadguile-99cc1092a89292c6e6db2db537988e5963b19868.tar.gz
Merge remote-tracking branch 'local-2.0/stable-2.0'
Diffstat (limited to 'lib/gai_strerror.c')
-rw-r--r--lib/gai_strerror.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/gai_strerror.c b/lib/gai_strerror.c
index 92b4dd054..cc6f9c062 100644
--- a/lib/gai_strerror.c
+++ b/lib/gai_strerror.c
@@ -32,6 +32,22 @@
# define N_(String) String
#endif
+#if HAVE_DECL_GAI_STRERROR
+
+# include <sys/socket.h>
+# undef gai_strerror
+# if HAVE_DECL_GAI_STRERRORA
+# define gai_strerror gai_strerrorA
+# endif
+
+const char *
+rpl_gai_strerror (int code)
+{
+ return gai_strerror (code);
+}
+
+#else /* !HAVE_DECL_GAI_STRERROR */
+
static struct
{
int code;
@@ -71,6 +87,7 @@ gai_strerror (int code)
return _("Unknown error");
}
-#ifdef _LIBC
+# ifdef _LIBC
libc_hidden_def (gai_strerror)
-#endif
+# endif
+#endif /* !HAVE_DECL_GAI_STRERROR */