GNOME Bugzilla – Bug 658157
windows build broken by Solaris socket fixing
Last modified: 2011-09-04 13:02:52 UTC
the mingw32 build is broken by this commit: commit af2a905e5480bc7eb82e7a43ef7fead7b3b90dd7 Author: Dan Winship <danw@gnome.org> Date: Sat Sep 3 19:14:16 2011 -0400 gsocket: fix g_socket_details_from_fd() on Solaris On Solaris, getsockname() on an unconnected socket gives an addrlen of 0 and doesn't set the sockaddr. So use the SO_DOMAIN sockopt to find the socket family in that case. (SO_DOMAIN doesn't exist everywhere, so we can't use it unconditionally. Also, we have to only use it if getsockname() fails, since SO_DOMAIN returns a bogus value for accept()ed sockets on both Linux and Solaris...) CC libgio_2_0_la-gsocket.lo gsocket.c: In function 'g_socket_details_from_fd': gsocket.c:323:3: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:543:35: note: expected 'int *' but argument is of type 'guint *' gsocket.c:367:32: warning: pointer targets in passing argument 3 of 'getsockname' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:542:35: note: expected 'int *' but argument is of type 'guint *' gsocket.c:392:15: error: 'ENOTSUP' undeclared (first use in this function) gsocket.c:392:15: note: each undeclared identifier is reported only once for each function it appears in gsocket.c:434:36: warning: pointer targets in passing argument 3 of 'getpeername' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:541:35: note: expected 'int *' but argument is of type 'guint *' gsocket.c:440:5: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:543:35: note: expected 'int *' but argument is of type 'guint *' gsocket.c: In function 'g_socket_get_local_address': gsocket.c:1263:46: warning: pointer targets in passing argument 3 of 'getsockname' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:542:35: note: expected 'int *' but argument is of type 'guint32 *' gsocket.c: In function 'g_socket_get_remote_address': gsocket.c:1306:50: warning: pointer targets in passing argument 3 of 'getpeername' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:541:35: note: expected 'int *' but argument is of type 'guint32 *' gsocket.c: In function 'g_socket_check_connect_result': gsocket.c:1732:3: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness /usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:543:35: note: expected 'int *' but argument is of type 'guint *'
fixed