Fossil SCM
include <winsock2.h> before <ws2tcpip.h> whenever needed. Thanks to Konstantin Khomoutov for reporting this.
Commit
0658068a237b8a5c3bc9df61e1b40f15da53b8ef
Parent
743b64ecf2380ca…
2 files changed
+1
+2
-4
+1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -21,10 +21,11 @@ | ||
| 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 | +# include <winsock2.h> | |
| 26 | 27 | # include <ws2tcpip.h> |
| 27 | 28 | #else |
| 28 | 29 | # include <sys/socket.h> |
| 29 | 30 | # include <netinet/in.h> |
| 30 | 31 | # include <arpa/inet.h> |
| 31 | 32 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -21,10 +21,11 @@ | |
| 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 <ws2tcpip.h> |
| 27 | #else |
| 28 | # include <sys/socket.h> |
| 29 | # include <netinet/in.h> |
| 30 | # include <arpa/inet.h> |
| 31 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -21,10 +21,11 @@ | |
| 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 | # include <arpa/inet.h> |
| 32 |
+2
-4
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -27,14 +27,12 @@ | ||
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | 29 | #include "config.h" |
| 30 | 30 | #include "http_socket.h" |
| 31 | 31 | #if defined(_WIN32) |
| 32 | -# if defined(__MINGW32__) | |
| 33 | -# include <ws2tcpip.h> | |
| 34 | -# endif | |
| 35 | -# include <windows.h> | |
| 32 | +# include <winsock2.h> | |
| 33 | +# include <ws2tcpip.h> | |
| 36 | 34 | #else |
| 37 | 35 | # include <netinet/in.h> |
| 38 | 36 | # include <arpa/inet.h> |
| 39 | 37 | # include <sys/socket.h> |
| 40 | 38 | # include <netdb.h> |
| 41 | 39 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -27,14 +27,12 @@ | |
| 27 | */ |
| 28 | |
| 29 | #include "config.h" |
| 30 | #include "http_socket.h" |
| 31 | #if defined(_WIN32) |
| 32 | # if defined(__MINGW32__) |
| 33 | # include <ws2tcpip.h> |
| 34 | # endif |
| 35 | # include <windows.h> |
| 36 | #else |
| 37 | # include <netinet/in.h> |
| 38 | # include <arpa/inet.h> |
| 39 | # include <sys/socket.h> |
| 40 | # include <netdb.h> |
| 41 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -27,14 +27,12 @@ | |
| 27 | */ |
| 28 | |
| 29 | #include "config.h" |
| 30 | #include "http_socket.h" |
| 31 | #if defined(_WIN32) |
| 32 | # include <winsock2.h> |
| 33 | # include <ws2tcpip.h> |
| 34 | #else |
| 35 | # include <netinet/in.h> |
| 36 | # include <arpa/inet.h> |
| 37 | # include <sys/socket.h> |
| 38 | # include <netdb.h> |
| 39 |