]> The Tcpdump Group git mirrors - libpcap/commitdiff
Do not compile gai_strerrorA on Windows under MingW. gai_strerror is already libpcap-0.9.8
authorgianluca <gianluca>
Wed, 19 Sep 2007 16:18:57 +0000 (16:18 +0000)
committergianluca <gianluca>
Wed, 19 Sep 2007 16:18:57 +0000 (16:18 +0000)
available on MingW, it's only missing from Cygwin.

Win32/Src/gai_strerror.c

index d3d7d6853e43f3da4f324ab06d3d7bc8fa8c540c..edd970b927c7652eb33f587de74c003aba5edb85 100644 (file)
@@ -67,6 +67,11 @@ static char *ai_errlist[] = {
 #define EAI_MAX (sizeof(ai_errlist)/sizeof(ai_errlist[0]))
 #endif
 
+/* on MingW, gai_strerror is available. 
+   We need to compile gai_strerrorA only for Cygwin
+ */
+#ifndef gai_strerror
+
 char *
 WSAAPI gai_strerrorA(int ecode)
 {
@@ -75,3 +80,4 @@ WSAAPI gai_strerrorA(int ecode)
        return "Unknown error";
 }
 
+#endif /* gai_strerror */
\ No newline at end of file