Sfoglia il codice sorgente

The inet_pton() call is only supported in Vista and above. Add define to declare we are compiling for Vista.

Christian Grothoff 12 anni fa
parent
commit
6d7d5bf784
1 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 10 2
      src/testcurl/test_options.c

+ 10 - 2
src/testcurl/test_options.c

@@ -19,14 +19,22 @@
  */
 
 /**
- * @file mhds_get_test.c
+ * @file test_options.c
  * @brief  Testcase for libmicrohttpd HTTPS GET operations
  * @author Sagie Amir
  */
-
 #include "platform.h"
 #include "microhttpd.h"
 
+/* inet_pton requires Vista, add defines to declare that we
+   are compiling for Vista */
+#if (defined(__MINGW64__) || defined(__MINGW32__))
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0600
+#endif
+#endif
+
+
 #define MHD_E_MEM "Error: memory error\n"
 #define MHD_E_SERVER_INIT "Error: failed to start server\n"