Ticket #15005 (confirmed enhancement)
Load getaddrinfo() and freeaddrinfo() dynamically when using non-MSVC compiler with wxUSE_IPV6=1
| Reported by: | guenter | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | network | Version: | 2.9-svn |
| Keywords: | Cc: | ||
| Blocked By: | Patch: | no | |
| Blocking: |
Description
When I set "#define wxUSE_IPV6 1" in setup.h build with mingw32 stops with error "wspiapi.h not found".
When I replace wspiapi.h by ws2spi.h build goes through.
Patch:
index ec572a2..e93797f 100644
--- a/src/common/sckaddr.cpp
+++ b/src/common/sckaddr.cpp
@@ -102,7 +102,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
// disable a warning occurring in Microsoft own version of this file
#pragma warning(disable:4706)
#endif
- #include <wspiapi.h>
+ #ifdef MINGW32
+ #include <ws2spi.h>
+ #else
+ #include <wspiapi.h>
+ #endif
#ifdef VISUALC
#pragma warning(default:4706)
#endif

