summaryrefslogtreecommitdiff
path: root/data/ruby/getaddrinfo.diff
blob: 9b03ca66773f25cbc07782781df32a3f7d2589a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index dcabb2022eb1..41db6960ade8 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -145,15 +145,6 @@ ruby_getaddrinfo__darwin(const char *nodename, const char *servname,
 #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__darwin((node),(serv),(hints),(res))
 #endif
 
-#ifndef GETADDRINFO_EMU
-struct getaddrinfo_arg
-{
-    const char *node;
-    const char *service;
-    const struct addrinfo *hints;
-    struct addrinfo **res;
-};
-
 #ifdef HAVE_INET_PTON
 static int
 parse_numeric_port(const char *service, int *portp)
@@ -182,6 +173,15 @@ parse_numeric_port(const char *service, int *portp)
 }
 #endif
 
+#ifndef GETADDRINFO_EMU
+struct getaddrinfo_arg
+{
+    const char *node;
+    const char *service;
+    const struct addrinfo *hints;
+    struct addrinfo **res;
+};
+
 static void *
 nogvl_getaddrinfo(void *arg)
 {