From 38db0dfaf17b49e5775b941161288da149f577b8 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 22 Apr 2008 10:57:31 +0200 Subject: [PATCH] Cast fourth argument to setsockopt on MinGW. --- ChangeLog | 5 +++++ lib/sys_socket.in.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9775d1f41..76cb76411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-22 Simon Josefsson + + * 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 * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index d94f425fc..cb84220fe 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 */ -- 2.11.0