aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2005-12-18 06:07:10 +0000
committerYang Tse <yangsita@gmail.com>2005-12-18 06:07:10 +0000
commit8a3280a2de29f1136e6f3986c670002b038ac903 (patch)
tree24b00ecc34b6e5b8e8c342e4dca258c48d440a6b
parent450a0a647a9866a2245e6f18dd5e57979e3858c7 (diff)
MingW guards getnameinfo, getaddrinfo and freeaddrinfo with _WIN32_WINNT >= 0x0501
-rw-r--r--acinclude.m44
-rw-r--r--ares/acinclude.m44
2 files changed, 8 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 1064a88b5..4ab166850 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -211,6 +211,10 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
#undef inline
#ifdef HAVE_WINDOWS_H
#define WIN32_LEAN_AND_MEAN
+#if defined(__MINGW32__) && (_WIN32_WINNT < 0x0501)
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
diff --git a/ares/acinclude.m4 b/ares/acinclude.m4
index 713a5b5a1..3b0572041 100644
--- a/ares/acinclude.m4
+++ b/ares/acinclude.m4
@@ -211,6 +211,10 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
#undef inline
#ifdef HAVE_WINDOWS_H
#define WIN32_LEAN_AND_MEAN
+#if defined(__MINGW32__) && (_WIN32_WINNT < 0x0501)
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>