Commit 93f1d487 authored by Kai Blin's avatar Kai Blin Committed by Alexandre Julliard

ws2_32: Win NT4 does not zero the sockaddr_in structure on getsockname.

All other versions of windows do, and this makes native dplay traces much more readable, which is why Wine implements this as well. Mark NT4 as broken, to make sure Wine doesn't regress.
parent 10090eb2
...@@ -1858,6 +1858,7 @@ static void test_getsockname(void) ...@@ -1858,6 +1858,7 @@ static void test_getsockname(void)
int sa_set_len = sizeof(struct sockaddr_in); int sa_set_len = sizeof(struct sockaddr_in);
int sa_get_len = sa_set_len; int sa_get_len = sa_set_len;
static const unsigned char null_padding[] = {0,0,0,0,0,0,0,0}; static const unsigned char null_padding[] = {0,0,0,0,0,0,0,0};
int ret;
if(WSAStartup(MAKEWORD(2,0), &wsa)){ if(WSAStartup(MAKEWORD(2,0), &wsa)){
trace("Winsock failed: %d. Aborting test\n", WSAGetLastError()); trace("Winsock failed: %d. Aborting test\n", WSAGetLastError());
...@@ -1900,7 +1901,8 @@ static void test_getsockname(void) ...@@ -1900,7 +1901,8 @@ static void test_getsockname(void)
return; return;
} }
ok(memcmp(sa_get.sin_zero, null_padding, 8) == 0, ret = memcmp(sa_get.sin_zero, null_padding, 8);
ok(ret == 0 || broken(ret != 0), /* NT4 */
"getsockname did not zero the sockaddr_in structure\n"); "getsockname did not zero the sockaddr_in structure\n");
closesocket(sock); closesocket(sock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment