Fossil SCM

Compilation fix for MinGW: consistently use _WIN32_WINNT when including winsock2.h, etc.

mistachkin 2016-11-03 18:31 trunk
Commit 26a88f1bbf98763fafda9e053a3b030fd9a638de
1 file changed +3
+3
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,13 @@
2121
** formatting function and its cousins, and routines to encode and
2222
** decode strings in HTML or HTTP.
2323
*/
2424
#include "config.h"
2525
#ifdef _WIN32
26
+# if !defined(_WIN32_WINNT)
27
+# define _WIN32_WINNT 0x0501
28
+# endif
2629
# include <winsock2.h>
2730
# include <ws2tcpip.h>
2831
#else
2932
# include <sys/socket.h>
3033
# include <netinet/in.h>
3134
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,13 @@
21 ** formatting function and its cousins, and routines to encode and
22 ** decode strings in HTML or HTTP.
23 */
24 #include "config.h"
25 #ifdef _WIN32
 
 
 
26 # include <winsock2.h>
27 # include <ws2tcpip.h>
28 #else
29 # include <sys/socket.h>
30 # include <netinet/in.h>
31
--- src/cgi.c
+++ src/cgi.c
@@ -21,10 +21,13 @@
21 ** formatting function and its cousins, and routines to encode and
22 ** decode strings in HTML or HTTP.
23 */
24 #include "config.h"
25 #ifdef _WIN32
26 # if !defined(_WIN32_WINNT)
27 # define _WIN32_WINNT 0x0501
28 # endif
29 # include <winsock2.h>
30 # include <ws2tcpip.h>
31 #else
32 # include <sys/socket.h>
33 # include <netinet/in.h>
34

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button