getsockopt.c: In function 'rpl_getsockopt':
getsockopt.c:51:7: warning: passing argument 4 of 'getsockopt' from
incompatible pointer type
c:\dev\msys_setup\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsock2.h:543:32:
note: expected 'char *' but argument is of type 'int *'
A simple cast works around the mingw signature lameness. If only
they had picked void* instead of char*, like POSIX says...
* lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
Reported by Matthias Bolte.
Signed-off-by: Eric Blake <eblake@redhat.com>
2011-04-28 Eric Blake <eblake@redhat.com>
+ getsockopt: avoid compiler warning
+ * lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
+ Reported by Matthias Bolte.
+
tests: drop unused link dependency
* modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
* modules/dirent-safer-tests (Makefile.am): Likewise.
int milliseconds_len = sizeof (int);
struct timeval tv;
size_t n;
- r = getsockopt (sock, level, optname, &milliseconds, &milliseconds_len);
+ r = getsockopt (sock, level, optname, (char *) &milliseconds,
+ &milliseconds_len);
tv.tv_sec = milliseconds / 1000;
tv.tv_usec = (milliseconds - 1000 * tv.tv_sec) * 1000;
n = sizeof (struct timeval);