Cast fourth argument to setsockopt on MinGW.
authorSimon Josefsson <simon@josefsson.org>
Tue, 22 Apr 2008 08:57:31 +0000 (10:57 +0200)
committerSimon Josefsson <simon@josefsson.org>
Tue, 22 Apr 2008 08:57:31 +0000 (10:57 +0200)
ChangeLog
lib/sys_socket.in.h

index 9775d1f..76cb764 100644 (file)
--- 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,
index d94f425..cb84220 100644 (file)
 #  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 */