The fix is right, and the reason behind it is worth recording: the problem is not the macro itself but the include order. afunix.h defines WS() at the top but, unlike winsock2.h (line 1286) and mswsock.h (line 258), it never undefines it again. In dlls/ws2_32/tests/sock.c afunix.h is included at line 34 and mswsock.h at line 36, so by the time SIO_AF_UNIX_GETPEERPID is used, WS is already gone - macros expand at the point of use, not where they are defined. What is left is a call to an undeclared function, so it does not stop at a warning: warning: implicit declaration of function 'WS' undefined reference to `WS' So splitting on USE_WS_PREFIX without WS() in the macro body is not a matter of taste; it is the form that survives any include order. Worth keeping in mind should someone reach for WS() there again. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_149609