Fossil SCM

Add winsock2.h for WinXP compatibility; was breaking the build

ashepilko 2018-08-02 03:35 trunk
Commit 889bc0f79488ccc9799fce3b74b17f6f48502b97ad7cd5aeb9b8e2ebfaf69e7e
1 file changed +4
--- src/winhttp.c
+++ src/winhttp.c
@@ -20,10 +20,14 @@
2020
** server to be run without any user logged on.
2121
*/
2222
#include "config.h"
2323
#ifdef _WIN32
2424
/* This code is for win32 only */
25
+# if !defined(_WIN32_WINNT)
26
+# define _WIN32_WINNT 0x0501
27
+# endif
28
+#include <winsock2.h>
2529
#include <ws2tcpip.h>
2630
#include <windows.h>
2731
#include <process.h>
2832
#include "winhttp.h"
2933
3034
--- src/winhttp.c
+++ src/winhttp.c
@@ -20,10 +20,14 @@
20 ** server to be run without any user logged on.
21 */
22 #include "config.h"
23 #ifdef _WIN32
24 /* This code is for win32 only */
 
 
 
 
25 #include <ws2tcpip.h>
26 #include <windows.h>
27 #include <process.h>
28 #include "winhttp.h"
29
30
--- src/winhttp.c
+++ src/winhttp.c
@@ -20,10 +20,14 @@
20 ** server to be run without any user logged on.
21 */
22 #include "config.h"
23 #ifdef _WIN32
24 /* This code is for win32 only */
25 # if !defined(_WIN32_WINNT)
26 # define _WIN32_WINNT 0x0501
27 # endif
28 #include <winsock2.h>
29 #include <ws2tcpip.h>
30 #include <windows.h>
31 #include <process.h>
32 #include "winhttp.h"
33
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