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 | 5 +++-- dlls/ws2_32/unixlib.c | 3 +-- server/sock.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 4e706323a0a..eda9bee681b 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -45,6 +45,7 @@
#ifdef HAVE_NETIPX_IPX_H # include <netipx/ipx.h> +# define HAS_IPX #elif defined(HAVE_LINUX_IPX_H) # ifdef HAVE_ASM_TYPES_H # include <asm/types.h> @@ -53,8 +54,6 @@ # include <linux/types.h> # endif # include <linux/ipx.h> -#endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif
@@ -2402,6 +2401,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc break; }
+#ifdef HAS_IPX #ifdef SOL_IPX case IOCTL_AFD_WINE_GET_IPX_PTYPE: return do_getsockopt( handle, io, SOL_IPX, IPX_TYPE, out_buffer, out_size ); @@ -2440,6 +2440,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc return do_setsockopt( handle, io, 0, SO_DEFAULT_HEADERS, &value, sizeof(value) ); } #endif +#endif
#ifdef HAS_IRDA #define MAX_IRDA_DEVICES 10 diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index 4646e8ff26f..5cb64aad258 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -66,6 +66,7 @@
#ifdef HAVE_NETIPX_IPX_H # include <netipx/ipx.h> +# define HAS_IPX #elif defined(HAVE_LINUX_IPX_H) # ifdef HAVE_ASM_TYPES_H # include <asm/types.h> @@ -74,8 +75,6 @@ # include <linux/types.h> # endif # include <linux/ipx.h> -#endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif
diff --git a/server/sock.c b/server/sock.c index 088e6d63079..34be6ea22ef 100644 --- a/server/sock.c +++ b/server/sock.c @@ -62,6 +62,7 @@
#ifdef HAVE_NETIPX_IPX_H # include <netipx/ipx.h> +# define HAS_IPX #elif defined(HAVE_LINUX_IPX_H) # ifdef HAVE_ASM_TYPES_H # include <asm/types.h> @@ -70,8 +71,6 @@ # include <linux/types.h> # endif # include <linux/ipx.h> -#endif -#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS) # define HAS_IPX #endif