diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 777d4b98..52fad3c2 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "63ef9854fb6fc91a8c956a9d91abc07e906a4a33" + echo "488432317206bc816432af0dd740e18979e37e58" } # Show version information diff --git a/patches/ws2_32-Connect_Time/0001-ws2_32-Implement-returning-the-proper-time-with-SO_C.patch b/patches/ws2_32-Connect_Time/0001-ws2_32-Implement-returning-the-proper-time-with-SO_C.patch index 5e2518e3..c59a54f9 100644 --- a/patches/ws2_32-Connect_Time/0001-ws2_32-Implement-returning-the-proper-time-with-SO_C.patch +++ b/patches/ws2_32-Connect_Time/0001-ws2_32-Implement-returning-the-proper-time-with-SO_C.patch @@ -1,7 +1,8 @@ -From 5cce90db6d3f5cc4dd4db2125bf4d2f3d2ec5b63 Mon Sep 17 00:00:00 2001 +From 750e6e7c7d5d3432136fc1560ffcf615ed5be03f Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 20 Nov 2014 13:27:24 +0100 -Subject: ws2_32: Implement returning the proper time with SO_CONNECT_TIME. +Subject: [PATCH] ws2_32: Implement returning the proper time with + SO_CONNECT_TIME. Based on a patch by Erich Hoover. @@ -15,11 +16,11 @@ Needs tools/make_requests. 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index b3db306..ac6d831 100644 +index c36b7dc23dd..59dff66e37f 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -881,6 +881,21 @@ static NTSTATUS _is_blocking(SOCKET s, BOOL *ret) - return status; +@@ -1175,6 +1175,21 @@ static DWORD sock_is_blocking(SOCKET s, BOOL *ret) + return err; } +static DWORD _get_connect_time(SOCKET s) @@ -40,7 +41,7 @@ index b3db306..ac6d831 100644 static unsigned int _get_sock_mask(SOCKET s) { unsigned int ret; -@@ -3125,7 +3140,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, +@@ -3962,7 +3977,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, case WS_SO_CONNECT_TIME: { @@ -48,7 +49,7 @@ index b3db306..ac6d831 100644 struct WS_sockaddr addr; int len = sizeof(addr); -@@ -3137,10 +3151,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, +@@ -3974,10 +3988,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, if (WS_getpeername(s, &addr, &len) == SOCKET_ERROR) *(DWORD *)optval = ~0u; else @@ -61,10 +62,10 @@ index b3db306..ac6d831 100644 return ret; } diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index acc2783..422174f 100644 +index b32d1c053df..60360bacc21 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c -@@ -4254,6 +4254,8 @@ static void test_send(void) +@@ -5385,6 +5385,8 @@ static void test_send(void) OVERLAPPED ov; BOOL bret; DWORD id, bytes_sent, dwRet; @@ -73,7 +74,7 @@ index acc2783..422174f 100644 memset(&ov, 0, sizeof(ov)); -@@ -4262,6 +4264,7 @@ static void test_send(void) +@@ -5393,6 +5395,7 @@ static void test_send(void) ok(0, "creating socket pair failed, skipping test\n"); return; } @@ -81,7 +82,7 @@ index acc2783..422174f 100644 set_blocking(dst, FALSE); /* force disable buffering so we can get a pending overlapped request */ -@@ -4348,6 +4351,22 @@ static void test_send(void) +@@ -5479,6 +5482,22 @@ static void test_send(void) ok(ret == SOCKET_ERROR && WSAGetLastError() == ERROR_IO_PENDING, "Failed to start overlapped send %d - %d\n", ret, WSAGetLastError()); @@ -105,10 +106,10 @@ index acc2783..422174f 100644 if (src != INVALID_SOCKET) closesocket(src); diff --git a/server/protocol.def b/server/protocol.def -index fc6bec5..840ba0d 100644 +index af959ebdf82..8afe8e11435 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1238,6 +1238,7 @@ enum server_fd_type +@@ -1399,6 +1399,7 @@ enum server_fd_type int family; /* family, see socket manpage */ int type; /* type, see socket manpage */ int protocol; /* protocol, see socket manpage */ @@ -117,10 +118,10 @@ index fc6bec5..840ba0d 100644 diff --git a/server/sock.c b/server/sock.c -index 7c0212e..7416eec 100644 +index 040fa3d14b1..48ef19b4fbd 100644 --- a/server/sock.c +++ b/server/sock.c -@@ -1093,6 +1093,7 @@ DECL_HANDLER(get_socket_info) +@@ -1331,6 +1331,7 @@ DECL_HANDLER(get_socket_info) reply->family = sock->family; reply->type = sock->type; reply->protocol = sock->proto; @@ -129,5 +130,5 @@ index 7c0212e..7416eec 100644 release_object( &sock->obj ); } -- -2.1.3 +2.19.1 diff --git a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch index 7eebe3fa..29169621 100644 --- a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch +++ b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch @@ -1,7 +1,7 @@ -From a6ac9b12f875e5ff57d4b837f66d1d62639fe93a Mon Sep 17 00:00:00 2001 +From c29cd38f3c72aee2e02c60945fc5bda1fab4d556 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 4 Mar 2015 13:16:20 -0700 -Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile. +Subject: [PATCH] ws2_32: Add support for TF_DISCONNECT to TransmitFile. --- dlls/ws2_32/socket.c | 16 +++++++++++++--- @@ -9,10 +9,10 @@ Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile. 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index bd080a0b16..eebf3e02eb 100644 +index 59dff66e37f..07f812b2391 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -3030,7 +3030,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws +@@ -3081,7 +3081,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws return wsaErrStatus(); } @@ -30,7 +30,7 @@ index bd080a0b16..eebf3e02eb 100644 } /*********************************************************************** -@@ -3066,6 +3075,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -3117,6 +3126,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, DWORD flags ) { @@ -38,7 +38,7 @@ index bd080a0b16..eebf3e02eb 100644 union generic_unix_sockaddr uaddr; socklen_t uaddrlen = sizeof(uaddr); struct ws2_transmitfile_async *wsa; -@@ -3087,8 +3097,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -3138,8 +3148,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD WSASetLastError( WSAENOTCONN ); return FALSE; } @@ -50,10 +50,10 @@ index bd080a0b16..eebf3e02eb 100644 if (h && GetFileType( h ) != FILE_TYPE_DISK) { diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index 23464ac1f1..57e2dd97d9 100644 +index 60360bacc21..134bb9625a6 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c -@@ -8682,6 +8682,17 @@ static void test_TransmitFile(void) +@@ -9057,6 +9057,17 @@ static void test_TransmitFile(void) ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)) == 0, "TransmitFile footer buffer did not match!\n"); @@ -72,5 +72,5 @@ index 23464ac1f1..57e2dd97d9 100644 closesocket(client); client = socket(AF_INET, SOCK_DGRAM, 0); -- -2.13.1 +2.19.1 diff --git a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch index 4302ca42..4ea99517 100644 --- a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch +++ b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch @@ -1,21 +1,21 @@ -From b44f5b5594c69442d83e7f35cb2188732de2eabb Mon Sep 17 00:00:00 2001 +From 3c9640222b7b6e5bfbb067911171761b4062143e Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 19:08:30 -0700 -Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. +Subject: [PATCH] ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. --- - dlls/ws2_32/socket.c | 13 +++++++++- + dlls/ws2_32/socket.c | 13 ++++++++- dlls/ws2_32/tests/sock.c | 1 - include/winsock.h | 1 + - server/protocol.def | 6 +++++ - server/sock.c | 65 +++++++++++++++++++++++++++++++++++++++++------- - 5 files changed, 75 insertions(+), 11 deletions(-) + server/protocol.def | 6 ++++ + server/sock.c | 63 +++++++++++++++++++++++++++++++++++----- + 5 files changed, 74 insertions(+), 10 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index e89f1683b68..9b01c2d4324 100644 +index 07f812b2391..c1cc4c6e209 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -3019,6 +3019,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws +@@ -3084,6 +3084,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws if (status != STATUS_SUCCESS) return status; @@ -33,7 +33,7 @@ index e89f1683b68..9b01c2d4324 100644 if (wsa->flags & TF_DISCONNECT) { /* we can't use WS_closesocket because it modifies the last error */ -@@ -3061,7 +3072,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -3126,7 +3137,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, DWORD flags ) { @@ -43,10 +43,10 @@ index e89f1683b68..9b01c2d4324 100644 socklen_t uaddrlen = sizeof(uaddr); struct ws2_transmitfile_async *wsa; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index cb2f652e030..e9337de3661 100644 +index 134bb9625a6..c40e277687e 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c -@@ -8695,7 +8695,6 @@ static void test_TransmitFile(void) +@@ -9069,7 +9069,6 @@ static void test_TransmitFile(void) err, WSAENOTSOCK); /* Test TransmitFile with a UDP datagram socket */ @@ -55,10 +55,10 @@ index cb2f652e030..e9337de3661 100644 bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0); err = WSAGetLastError(); diff --git a/include/winsock.h b/include/winsock.h -index cf9adf57ebd..2feb22466e4 100644 +index 789e1da8172..86ce4ffcf05 100644 --- a/include/winsock.h +++ b/include/winsock.h -@@ -816,6 +816,7 @@ typedef struct WS(WSAData) +@@ -829,6 +829,7 @@ typedef struct WS(WSAData) /* internal per-socket flags */ #ifdef __WINESRC__ @@ -67,10 +67,10 @@ index cf9adf57ebd..2feb22466e4 100644 #define FD_WINE_NONBLOCKING 0x20000000 #define FD_WINE_CONNECTED 0x40000000 diff --git a/server/protocol.def b/server/protocol.def -index 1f88c6a5c86..e192011d465 100644 +index 8afe8e11435..614ab91ae7d 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1312,6 +1312,12 @@ enum server_fd_type +@@ -1369,6 +1369,12 @@ enum server_fd_type @END @@ -84,7 +84,7 @@ index 1f88c6a5c86..e192011d465 100644 @REQ(set_socket_event) obj_handle_t handle; /* handle to the socket */ diff --git a/server/sock.c b/server/sock.c -index 083f583e8fa..52c1e28fa66 100644 +index 48ef19b4fbd..d95e847fd6b 100644 --- a/server/sock.c +++ b/server/sock.c @@ -86,6 +86,7 @@ @@ -102,8 +102,8 @@ index 083f583e8fa..52c1e28fa66 100644 +static int sock_close_handle( struct object *obj, struct process *process, obj_handle_t handle ); static int sock_get_ntstatus( int err ); - static int sock_get_error( int err ); -@@ -156,7 +158,7 @@ static const struct object_ops sock_ops = + static unsigned int sock_get_error( int err ); +@@ -155,7 +157,7 @@ static const struct object_ops sock_ops = NULL, /* unlink_name */ no_open_file, /* open_file */ no_alloc_handle, /* alloc_handle */ @@ -112,7 +112,7 @@ index 083f583e8fa..52c1e28fa66 100644 sock_destroy /* destroy */ }; -@@ -609,6 +611,47 @@ static struct fd *sock_get_fd( struct object *obj ) +@@ -607,6 +609,46 @@ static struct fd *sock_get_fd( struct object *obj ) return (struct fd *)grab_object( sock->fd ); } @@ -121,11 +121,10 @@ index 083f583e8fa..52c1e28fa66 100644 + int sockfd; + + sockfd = socket( family, type, protocol ); -+ if (debug_level) -+ fprintf(stderr,"socket(%d,%d,%d)=%d\n",family,type,protocol,sockfd); + if (sockfd == -1) + { -+ sock_set_error(); ++ if (errno == EINVAL) set_win32_error( WSAESOCKTNOSUPPORT ); ++ else set_win32_error( sock_get_error( errno )); + return sockfd; + } + fcntl(sockfd, F_SETFL, O_NONBLOCK); /* make socket nonblocking */ @@ -160,16 +159,15 @@ index 083f583e8fa..52c1e28fa66 100644 static void sock_destroy( struct object *obj ) { struct sock *sock = (struct sock *)obj; -@@ -661,15 +704,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne +@@ -660,14 +702,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne struct sock *sock; int sockfd; - sockfd = socket( family, type, protocol ); -- if (debug_level) -- fprintf(stderr,"socket(%d,%d,%d)=%d\n",family,type,protocol,sockfd); - if (sockfd == -1) - { -- sock_set_error(); +- if (errno == EINVAL) set_win32_error( WSAESOCKTNOSUPPORT ); +- else set_win32_error( sock_get_error( errno )); + if ((sockfd = init_sockfd( family, type, protocol )) == -1) return NULL; - } @@ -177,7 +175,7 @@ index 083f583e8fa..52c1e28fa66 100644 if (!(sock = alloc_object( &sock_ops ))) { close( sockfd ); -@@ -1238,6 +1274,17 @@ DECL_HANDLER(accept_into_socket) +@@ -1218,6 +1254,17 @@ DECL_HANDLER(accept_into_socket) release_object( sock ); } @@ -196,5 +194,5 @@ index 083f583e8fa..52c1e28fa66 100644 DECL_HANDLER(set_socket_event) { -- -2.13.1 +2.19.1