Fossil SCM
Compilation fix for MinGW: consistently use _WIN32_WINNT when including winsock2.h, etc.
Commit
26a88f1bbf98763fafda9e053a3b030fd9a638de
Parent
11e105b3c958b4a…
1 file changed
+3
+3
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -21,10 +21,13 @@ | ||
| 21 | 21 | ** formatting function and its cousins, and routines to encode and |
| 22 | 22 | ** decode strings in HTML or HTTP. |
| 23 | 23 | */ |
| 24 | 24 | #include "config.h" |
| 25 | 25 | #ifdef _WIN32 |
| 26 | +# if !defined(_WIN32_WINNT) | |
| 27 | +# define _WIN32_WINNT 0x0501 | |
| 28 | +# endif | |
| 26 | 29 | # include <winsock2.h> |
| 27 | 30 | # include <ws2tcpip.h> |
| 28 | 31 | #else |
| 29 | 32 | # include <sys/socket.h> |
| 30 | 33 | # include <netinet/in.h> |
| 31 | 34 |
| --- 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 |