changeset 9962:7263aa22b4d6

Cast fourth argument to setsockopt on MinGW.
author Simon Josefsson <simon@josefsson.org>
date Tue, 22 Apr 2008 10:57:31 +0200
parents 794d8915527c
children c7bacb867b81
files ChangeLog lib/sys_socket.in.h
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-22  Simon Josefsson  <simon@josefsson.org>
+
+	* lib/sys_socket.in.h: Define setsockopt macro to cast fourth
+	parameter to void* as per POSIX standard (MinGW uses char*).
+
 2008-04-21  Bruno Haible  <bruno@clisp.org>
 
 	* lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
--- 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 */