summaryrefslogtreecommitdiff
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-23 15:31:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-23 15:31:21 +0000
commitfb6c4ca168513b19083d0831dbe764d4f309b58e (patch)
tree1c3e216bbbe562511905a04b4132cd379378b1ce /ext/socket/getaddrinfo.c
parent813a206d5652ef9d0db73459972e1c930d7bd0d8 (diff)
getaddrinfo.c: ai_errlist
* ext/socket/getaddrinfo.c (ai_errlist): used only if gai_strerror is missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r--ext/socket/getaddrinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index b01f1cb..ce6dc40 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -149,6 +149,7 @@ static int get_addr __P((const char *, int, struct addrinfo **,
struct addrinfo *, int));
static int str_isnumber __P((const char *));
+#ifndef HAVE_GAI_STRERROR
static const char *const ai_errlist[] = {
"success.",
"address family for hostname not supported.", /* EAI_ADDRFAMILY */
@@ -166,6 +167,7 @@ static const char *const ai_errlist[] = {
"resolved protocol is unknown.", /* EAI_PROTOCOL */
"unknown error.", /* EAI_MAX */
};
+#endif
#define GET_CANONNAME(ai, str) \
if (pai->ai_flags & AI_CANONNAME) {\