From 9325b26b42989592cab7b0bee28baf7a005e17db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 25 Mar 2015 16:57:52 +0100 Subject: [PATCH] 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. --- library/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/net.c b/library/net.c index 2d494631f3..1bd5160598 100644 --- a/library/net.c +++ b/library/net.c @@ -452,7 +452,7 @@ int net_accept( int bind_fd, int *client_fd, void *client_ip ) #endif /* 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 ) ) { return( POLARSSL_ERR_NET_ACCEPT_FAILED );