This is the mail archive of the
mailing list for the GDB project.
[RFA] Fix compilation of mingw64 with recent mingw64 header
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 15 Nov 2011 18:22:50 +0100
- Subject: [RFA] Fix compilation of mingw64 with recent mingw64 header
Recent mingw64 header (at least on Cygwin)
have a macro definition for ETIMEDOUT inside include/errno.h
This leads to a warning and a compilation failure for the target.
This patch simply discard the value from errno.h,
but there would be another option consisting of
using #ifndef ETIMEDOUT....
I have no idea if this would be preferable.
This is the reason why I didn't apply the obvious rule
for compilation failure.
2011-11-15 Pierre Muller <firstname.lastname@example.org>
* ser-tcp.c (USE_WIN32API ETIMEDOUT macro): Undefine first to
avoid warning if already defined as in recent mingw64 errno header.
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index e3d5640..a848e27 100644
@@ -39,6 +39,7 @@
#define ETIMEDOUT WSAETIMEDOUT
#define close(fd) closesocket (fd)
#define ioctl ioctlsocket