wininet & winhttp: Fix a pointer type mismatch warning when compiling on Windows. On Windows setsockopt() expects a char* while on Unix it accepts anything.

This commit is contained in:
Francois Gouget 2008-12-08 09:28:43 +01:00 committed by Alexandre Julliard
parent c0c38be711
commit c1b2008d0c
2 changed files with 2 additions and 2 deletions

View File

@ -558,7 +558,7 @@ DWORD netconn_set_timeout( netconn_t *netconn, BOOL send, int value )
tv.tv_sec = value / 1000;
tv.tv_usec = (value % 1000) * 1000;
if ((res = setsockopt( netconn->socket, SOL_SOCKET, send ? SO_SNDTIMEO : SO_RCVTIMEO, &tv, sizeof(tv) ) == -1))
if ((res = setsockopt( netconn->socket, SOL_SOCKET, send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv, sizeof(tv) ) == -1))
{
WARN("setsockopt failed (%s)\n", strerror( errno ));
return sock_get_error( errno );

View File

@ -769,7 +769,7 @@ DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value
tv.tv_usec = (value % 1000) * 1000;
result = setsockopt(connection->socketFD, SOL_SOCKET,
send ? SO_SNDTIMEO : SO_RCVTIMEO, &tv,
send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv,
sizeof(tv));
if (result == -1)