aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-30 13:45:25 +0000
committerYang Tse <yangsita@gmail.com>2008-10-30 13:45:25 +0000
commit0ce97f77e02acd2de15970270834a7011ce6cb38 (patch)
treef4126643e401db6323a14eba48d4611e9d95d4f6 /tests/libtest
parent197ad60d219e33efcbf0ad28618ce88cfd4b9713 (diff)
Use our Curl_addrinfo definition even when an addrinfo struct is available.
Use a wrapper function to call system's getaddrinfo().
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib558.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/libtest/lib558.c b/tests/libtest/lib558.c
index f1095d45e..00c0a490a 100644
--- a/tests/libtest/lib558.c
+++ b/tests/libtest/lib558.c
@@ -10,11 +10,17 @@
#include "test.h"
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
#ifdef HAVE_NETDB_H
-#include <netdb.h>
+# include <netdb.h>
#endif
#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
+# include <arpa/inet.h>
#endif
#define ENABLE_CURLX_PRINTF
@@ -64,13 +70,6 @@ static Curl_addrinfo *fake_ai(void)
ai->ai_family = AF_INET;
ai->ai_addrlen = ss_size;
-#if defined(ENABLE_IPV6) && defined(CURLDEBUG)
- /* For tracing purposes log a fake call to getaddrinfo */
- if(logfile)
- fprintf(logfile, "ADDR %s:%d getaddrinfo() = %p\n",
- __FILE__, __LINE__, (void *)ai);
-#endif
-
return ai;
}
#endif /* LIB559 */