aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgianluca <gianluca>2007-09-19 16:19:20 +0000
committergianluca <gianluca>2007-09-19 16:19:20 +0000
commit1cd243c9720c96cb31882032d6282a8f5d9a5727 (patch)
treeda4770a134cd889243c36be9bf514f2ccc0d8ad7
parentfe7433245e46d42424b8ca43676078ea9a678d0b (diff)
Do not compile gai_strerrorA on Windows under MingW. gai_strerror is already
available on MingW, it's only missing from Cygwin.
-rw-r--r--Win32/Src/gai_strerror.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Win32/Src/gai_strerror.c b/Win32/Src/gai_strerror.c
index d3d7d68..edd970b 100644
--- a/Win32/Src/gai_strerror.c
+++ b/Win32/Src/gai_strerror.c
@@ -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