Skip to content

Commit 7116a54

Browse files
committed
Fix compilation error on windows
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>
1 parent 7dbf547 commit 7116a54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

httplib.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ using ssize_t = long;
184184
#define NOMINMAX
185185
#endif // NOMINMAX
186186

187-
#include <afunix.h>
188187
#include <io.h>
189188
#include <winsock2.h>
189+
// afunix.h uses types declared in winsock2.h, so has to be included after it.
190+
#include <afunix.h>
190191
#include <ws2tcpip.h>
191192

192193
#ifndef WSA_FLAG_NO_HANDLE_INHERIT

0 commit comments

Comments
 (0)