ws2_32/tests: Fix a NT4 crash due to unsupported SIO_ADDRESS_LIST_QUERY.

This commit is contained in:
Bruno Jesus 2015-03-08 01:05:52 -03:00 committed by Alexandre Julliard
parent 2522e205ec
commit a65ae0ea57
1 changed files with 6 additions and 0 deletions

View File

@ -7960,6 +7960,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);