Skip to content

Conversation

@p1-0tr
Copy link

@p1-0tr p1-0tr commented Mar 25, 2025

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

@yhirose
Copy link
Owner

yhirose commented Mar 25, 2025

@p1-0tr thanks for finding the problem! Could you please change the code as follows, so that clangformat can still sort include file entries in the block, and keep afunix.h out of the block. Thanks!

#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>

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 <[email protected]>
@p1-0tr p1-0tr force-pushed the ps-fix-compile-error branch from 7116a54 to 82a4c73 Compare March 25, 2025 11:57
@yhirose yhirose merged commit dbc4af8 into yhirose:master Mar 25, 2025
9 checks passed
@yhirose
Copy link
Owner

yhirose commented Mar 25, 2025

@p1-0tr thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants