Hi. Under MinGW, setsockopt has a 'const char*' 4th argument instead of 'const void*' as specified by POSIX, compare:
http://www.opengroup.org/onlinepubs/009695399/functions/setsockopt.html with http://msdn2.microsoft.com/en-us/library/ms740476.aspx This was raised in this report against gnutls: http://thread.gmane.org/gmane.network.gnutls.general/1145/focus=1195 The follow patch appear to silent compiler warnings. Can anyone think of a better way to fix this? If not I'll commit and push this shortly. /Simon 2008-04-22 Simon Josefsson <[EMAIL PROTECTED]> * lib/sys_socket.in.h: Define setsockopt macro to cast fourth parameter to void* as per POSIX standard (MinGW uses char*). diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index d94f425..cb84220 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -102,6 +102,10 @@ # define ESHUTDOWN WSAESHUTDOWN # endif +# if defined _WIN32 || defined __WIN32__ +# define setsockopt(a,b,c,d,e) setsockopt(a,b,c,(const void*)(d),e) +# endif + #endif /* HAVE_SYS_SOCKET_H */ #endif /* _GL_SYS_SOCKET_H */