summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_procnet.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-04-24 13:44:23 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-04-24 13:44:23 +0000
commit8e220283396b4720c181695bf4046ad26e84a712 (patch)
treea46468f6b3c796f273bf10f32e87396bb09ffda7 /winsup/cygwin/fhandler_procnet.cc
parentef7e42ec0f684183172dc3c71b9b27a6f5cae696 (diff)
downloadcygnal-8e220283396b4720c181695bf4046ad26e84a712.tar.gz
cygnal-8e220283396b4720c181695bf4046ad26e84a712.tar.bz2
cygnal-8e220283396b4720c181695bf4046ad26e84a712.zip
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_procnet.cc')
-rw-r--r--winsup/cygwin/fhandler_procnet.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler_procnet.cc
index 73f06f637..0ba64aeea 100644
--- a/winsup/cygwin/fhandler_procnet.cc
+++ b/winsup/cygwin/fhandler_procnet.cc
@@ -11,6 +11,13 @@ details. */
#define __INSIDE_CYGWIN_NET__
#define USE_SYS_TYPES_FD_SET
#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. */
+#undef u_long
+#define u_long __ms_u_long
+#endif
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include "cygerrno.h"