Fossil SCM
Further magic _WIN32_WINNT changes to fix the build for mingw.
Commit
45b76344362cba9a9b3ae687760e34e32b43a3f1
Parent
8133501ecbf7810…
1 file changed
+3
-4
+3
-4
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -23,20 +23,19 @@ | ||
| 23 | 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | 24 | ** |
| 25 | 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | 26 | ** are handled different on Unix and windows. |
| 27 | 27 | */ |
| 28 | - | |
| 28 | +#if defined(_WIN32) | |
| 29 | +# define _WIN32_WINNT 0x501 | |
| 30 | +#endif | |
| 29 | 31 | #ifndef __EXTENSIONS__ |
| 30 | 32 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 31 | 33 | #endif |
| 32 | 34 | #include "config.h" |
| 33 | 35 | #include "http_socket.h" |
| 34 | 36 | #if defined(_WIN32) |
| 35 | -# if !defined(_WIN32_WINNT) | |
| 36 | -# define _WIN32_WINNT 0x0501 | |
| 37 | -# endif | |
| 38 | 37 | # include <winsock2.h> |
| 39 | 38 | # include <ws2tcpip.h> |
| 40 | 39 | #else |
| 41 | 40 | # include <netinet/in.h> |
| 42 | 41 | # include <arpa/inet.h> |
| 43 | 42 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -23,20 +23,19 @@ | |
| 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | ** |
| 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | ** are handled different on Unix and windows. |
| 27 | */ |
| 28 | |
| 29 | #ifndef __EXTENSIONS__ |
| 30 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 31 | #endif |
| 32 | #include "config.h" |
| 33 | #include "http_socket.h" |
| 34 | #if defined(_WIN32) |
| 35 | # if !defined(_WIN32_WINNT) |
| 36 | # define _WIN32_WINNT 0x0501 |
| 37 | # endif |
| 38 | # include <winsock2.h> |
| 39 | # include <ws2tcpip.h> |
| 40 | #else |
| 41 | # include <netinet/in.h> |
| 42 | # include <arpa/inet.h> |
| 43 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -23,20 +23,19 @@ | |
| 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | ** |
| 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | ** are handled different on Unix and windows. |
| 27 | */ |
| 28 | #if defined(_WIN32) |
| 29 | # define _WIN32_WINNT 0x501 |
| 30 | #endif |
| 31 | #ifndef __EXTENSIONS__ |
| 32 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 33 | #endif |
| 34 | #include "config.h" |
| 35 | #include "http_socket.h" |
| 36 | #if defined(_WIN32) |
| 37 | # include <winsock2.h> |
| 38 | # include <ws2tcpip.h> |
| 39 | #else |
| 40 | # include <netinet/in.h> |
| 41 | # include <arpa/inet.h> |
| 42 |