gai_strerror on MingW

Gisle Vanem <[email protected]> Sun, 26 Jun 2005 19:06:29 +0200
Newsgroups gmane.comp.web.wget.patches
Message-ID <[email protected]>
gai_strerror() is needed in ENABLE_IPV6 code, but it's lacking in the
MingW import libraries (should ideally be part of libws32_2.a).

--- orig\src\mswindows.h        Sun Jun 26 14:16:39 2005
+++ src\mswindows.h  Sun Jun 26 14:20:15 2005
@@ -174,6 +174,14 @@
 #ifndef INHIBIT_WRAP
 # define strerror windows_strerror
 #endif
+
+/* MingW 3.7 (or older) prototypes gai_strerror(), but is missing
+   from all import libraries. */
+#ifdef __MINGW32__
+# undef gai_strerror
+# define gai_strerror windows_strerror
+#endif
+
 const char *windows_strerror (int);

 /* Declarations of various socket errors:  */

---------------
Gisle V.

# rm /bin/laden 
/bin/laden: Not found