[1/4] ws2_32/tests: Fix a NT4 crash due to unsupported functions

Bruno Jesus 00cpxxx at gmail.com
Fri Mar 6 12:24:50 CST 2015


-------------- next part --------------

---
 dlls/ws2_32/tests/sock.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 7155a09..ce7af0e 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7958,6 +7958,12 @@ static void test_address_list_query(void)
     bytes_returned = 0;
     ret = WSAIoctl(s, SIO_ADDRESS_LIST_QUERY, NULL, 0, NULL, 0, &bytes_returned, NULL, NULL);
     ok(ret == SOCKET_ERROR, "Got unexpected ret %d.\n", ret);
+    if(WSAGetLastError() == WSAEINVAL)
+    {
+      win_skip("Windows <= NT4 is not supported in this test\n");
+      closesocket(s);
+      return;
+    }
     ok(WSAGetLastError() == WSAEFAULT, "Got unexpected error %d.\n", WSAGetLastError());
     ok(bytes_returned >= FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address[0]),
             "Got unexpected bytes_returned %u.\n", bytes_returned);
-- 
1.8.3.2



More information about the wine-patches mailing list