4.18+ Linux kernels remove support for IPX but keep SOL_IPX defined, which causes compilation errors as wine unconditionally uses IPX structures if this is the case. Instead check for IPX_MTU to determine IPX support as it is defined within the ipx.h header itself.
From: Billy Laws blaws05@gmail.com
4.18+ Linux kernels remove support for IPX but keep SOL_IPX defined, which causes compilation errors as wine unconditionally uses IPX structures if this is the case. Instead check for IPX_MTU to determine IPX support as it is defined within the ipx.h header itself. --- dlls/ntdll/unix/socket.c | 4 ++-- dlls/ws2_32/unixlib.c | 2 +- server/sock.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 4e706323a0a..e584bebb8d8 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -54,7 +54,7 @@ # endif # include <linux/ipx.h> #endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) +#if defined(IPX_MTU) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif
@@ -2402,7 +2402,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc break; }
-#ifdef SOL_IPX +#if defined(HAS_IPX) && defined(SOL_IPX) case IOCTL_AFD_WINE_GET_IPX_PTYPE: return do_getsockopt( handle, io, SOL_IPX, IPX_TYPE, out_buffer, out_size );
diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index 4646e8ff26f..a9d08c1a277 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -75,7 +75,7 @@ # endif # include <linux/ipx.h> #endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) +#if defined(IPX_MTU) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif
diff --git a/server/sock.c b/server/sock.c index 088e6d63079..63019a18e85 100644 --- a/server/sock.c +++ b/server/sock.c @@ -71,7 +71,7 @@ # endif # include <linux/ipx.h> #endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) +#if defined(IPX_MTU) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif
On my machine IPX definitions are provided by netipx/ipx.h, which is apparently part of glibc. I guess this is something that only affects environments with alternate libcs?
Should we instead define HAS_IPX based on whether netipx/ipx.h or linux/ipx.h is present?
On Mon Jun 5 08:39:21 2023 +0000, Zebediah Figura wrote:
On my machine IPX definitions are provided by netipx/ipx.h, which is apparently part of glibc. I guess this is something that only affects environments with alternate libcs? Should we instead define HAS_IPX based on whether netipx/ipx.h or linux/ipx.h is present?
Yeah, I am using bionic hence why I'm running into this issue. By checking for IPX_MTU that's what this effectively does as that's only defined in ipx.h, but I can split it into just defining it for each of the different include cases if you'd prefer.