summaryrefslogtreecommitdiff
path: root/ext/socket/getnameinfo.c
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-14 14:35:50 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-14 14:35:50 +0000
commited131ebad88c2948d7b40f93ff6ce39f1eb8a2f7 (patch)
tree7bbf62c5e0d0bb8ff971637cf432c6f16824f8f6 /ext/socket/getnameinfo.c
parentbe1fea072cd0d22788ef8a931c0c6b64a2503b5d (diff)
This commit was manufactured by cvs2svn to create tag 'v1_4_4'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_4_4@668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getnameinfo.c')
-rw-r--r--ext/socket/getnameinfo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index cb65e4c070..774177c8c1 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -34,6 +34,7 @@
* but INRIA implementation returns EAI_xxx defined for getaddrinfo().
*/
+#include "config.h"
#include <sys/types.h>
#ifndef NT
#include <sys/socket.h>
@@ -60,10 +61,15 @@
#include <socks.h>
#endif
-#include "config.h"
#include "addrinfo.h"
#include "sockport.h"
+#ifndef INET6
+#ifndef NT
+extern int h_errno;
+#endif
+#endif
+
#define SUCCESS 0
#define ANY 0
#define YES 1
@@ -149,9 +155,6 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
int h_error;
char numserv[512];
char numaddr[512];
-#ifndef NT
- extern int h_errno;
-#endif
if (sa == NULL)
return ENI_NOSOCKET;