[PATCH 1/4] include: Always use the WS_* prefix on Unix.

Alexandre Julliard julliard at winehq.org
Tue Jan 11 08:14:19 CST 2022


Zebediah Figura <zfigura at codeweavers.com> writes:

> From: Alexandre Julliard <julliard at winehq.org>
>
> This removes the ability to use Windows sockets on Unix.
>
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52250
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
>
> Extended from the original revision to include all headers that interpret
> USE_WS_PREFIX, not just the main socket ones. Note that in particular inaddr.h
> can be included by iphlpapi.h without requiring winsock.h or winsock2.h.

This breaks non-Mingw builds. We could change all the places that
include winsock2.h before msvcrt headers but that's not a great
solution...

clang -m64 -c -o dlls/dhcpcsvc/tests/dhcpcsvc.o ../wine/dlls/dhcpcsvc/tests/dhcpcsvc.c -Idlls/dhcpcsvc/tests \
  -I../wine/dlls/dhcpcsvc/tests -Iinclude -I../wine/include -I../wine/include/msvcrt -D__WINESRC__ \
  -D_MSVCR_VER=0 -fPIC -fasynchronous-unwind-tables -D_WIN32 -fno-builtin -fshort-wchar -mabi=ms \
  -Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack \
  -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith -gdwarf-4 -g -O2 -Wno-enum-conversion -Wno-sometimes-uninitialized -Wno-ignored-attributes -Wno-array-bounds -Wno-absolute-value -Wno-incompatible-pointer-types
../wine/dlls/dhcpcsvc/tests/dhcpcsvc.c:33:37: error: use of undeclared identifier 'AF_UNSPEC'
        err = GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST |
                                    ^
1 error generated.
make: *** [Makefile:61889: dlls/dhcpcsvc/tests/dhcpcsvc.o] Error 1

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list