From 8e220283396b4720c181695bf4046ad26e84a712 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 24 Apr 2014 13:44:23 +0000 Subject: * fhandler_socket.cc: On x86_64, define u_long as __ms_u_long before including the windows headers. Explain why. (get_inet_addr): Convert ANY address to LOOPBACK address. Explain why. (fhandler_socket::evaluate_events): Forcibly set SO_ERROR socket option in case a connection attempt failed. Explain why. (fhandler_socket::ioctl): Drop x86_64 re-definition of u_long here. * fhandler_procnet.cc: On x86_64, define u_long as __ms_u_long before including the windows headers. Explain why. * net.cc: Ditto. --- winsup/cygwin/net.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 0e7776029..5ccfc96fd 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -20,6 +20,15 @@ details. */ system functions on Vista and later. */ #define _INC_NETIOAPI #include "winsup.h" +#ifdef __x86_64__ +/* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte) + because a redefinition for LP64 systems is missing. This leads to a wrong + definition and size of sockaddr_in6 when building with winsock headers. + This definition is also required to use the right u_long type in subsequent + function calls. */ +#undef u_long +#define u_long __ms_u_long +#endif #include #include #include -- cgit v1.2.3