mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-12 06:01:40 +00:00
Fix compilation error on windows (#2118)
afunix.h uses types declared in winsock2.h, and so has to be included after it. Including afunix.h first will result in a somewhat unhelpful compilation error: error C3646: 'sun_family': unknown override specifier Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
This commit is contained in:
parent
7dbf5471ce
commit
dbc4af819a
@ -184,11 +184,13 @@ using ssize_t = long;
|
|||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#endif // NOMINMAX
|
#endif // NOMINMAX
|
||||||
|
|
||||||
#include <afunix.h>
|
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
|
// afunix.h uses types declared in winsock2.h, so has to be included after it.
|
||||||
|
#include <afunix.h>
|
||||||
|
|
||||||
#ifndef WSA_FLAG_NO_HANDLE_INHERIT
|
#ifndef WSA_FLAG_NO_HANDLE_INHERIT
|
||||||
#define WSA_FLAG_NO_HANDLE_INHERIT 0x80
|
#define WSA_FLAG_NO_HANDLE_INHERIT 0x80
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user