Updated ws2_32-SIO_IDEAL_SEND_BACKLOG_QUERY patchset

macos doesn't support SO_PROTOCOL.
This commit is contained in:
Alistair Leslie-Hughes 2022-01-26 21:10:46 +11:00
parent 5b0e78d2c0
commit b8a377e8d7

View File

@ -1,4 +1,4 @@
From 38b454cf42d01fe4558276b571842b213aa21e1a Mon Sep 17 00:00:00 2001
From e09f13e07463f2009f7705f0fe6f4a4c15b9876b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 15 Sep 2020 19:44:38 +1000
Subject: [PATCH] ws2_32: Return a valid value for WSAIoctl
@ -6,25 +6,22 @@ Subject: [PATCH] ws2_32: Return a valid value for WSAIoctl
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/ntdll/unix/socket.c | 31 +++++++++++++++++++++++++++++++
dlls/ntdll/unix/socket.c | 22 ++++++++++++++++++++++
dlls/ws2_32/socket.c | 17 +++++++++++++++++
dlls/ws2_32/tests/sock.c | 13 ++++++++++++-
include/wine/afd.h | 1 +
4 files changed, 61 insertions(+), 1 deletion(-)
4 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index 71dfcdd1114..f62d54ef148 100644
index 71dfcdd1114..cf52e53a236 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -1422,6 +1422,37 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
@@ -1422,6 +1422,28 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
return STATUS_SUCCESS;
}
+ case IOCTL_AFD_WINE_SEND_BACKLOG_QUERY:
+ {
+ int proto;
+ unsigned protolen = sizeof(protolen);
+
+ if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
+ return status;
+
@ -34,13 +31,7 @@ index 71dfcdd1114..f62d54ef148 100644
+ break;
+ }
+
+ if (getsockopt( fd, SOL_SOCKET, SO_PROTOCOL, &proto, &protolen ) < 0)
+ {
+ status = sock_errno_to_status( errno );
+ break;
+ }
+
+ if(proto != IPPROTO_TCP)
+ if(get_sock_type( handle ) != SOCK_STREAM)
+ {
+ status = STATUS_NOT_SUPPORTED;
+ break;