Fix warning with mingw32

Apparently it thinks getsockopt()'s should be a char *, while it's a void *
according to POSIX. Casting to void * avoids the warning.
This commit is contained in:
Manuel Pégourié-Gonnard 2015-03-25 16:57:52 +01:00
parent aeab252fef
commit 9325b26b42

View file

@ -452,7 +452,7 @@ int net_accept( int bind_fd, int *client_fd, void *client_ip )
#endif #endif
/* Is this a TCP or UDP socket? */ /* Is this a TCP or UDP socket? */
if( getsockopt( bind_fd, SOL_SOCKET, SO_TYPE, &type, &type_len ) != 0 || if( getsockopt( bind_fd, SOL_SOCKET, SO_TYPE, (void *) &type, &type_len ) != 0 ||
( type != SOCK_STREAM && type != SOCK_DGRAM ) ) ( type != SOCK_STREAM && type != SOCK_DGRAM ) )
{ {
return( POLARSSL_ERR_NET_ACCEPT_FAILED ); return( POLARSSL_ERR_NET_ACCEPT_FAILED );