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:
Piotr 2025-03-25 13:36:20 +01:00 committed by GitHub
parent 7dbf5471ce
commit dbc4af819a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,11 +184,13 @@ using ssize_t = long;
#define NOMINMAX
#endif // NOMINMAX
#include <afunix.h>
#include <io.h>
#include <winsock2.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
#define WSA_FLAG_NO_HANDLE_INHERIT 0x80
#endif