[PATCH] ETIMEDOUT already defined in mingw64 library

Alen Skondro
2011-10-27T22:14:55Z

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

This fixes the problem compiling gdb with latest mingw64 library (trunk).

* ETIMEDOUT is already defined in mingw64.

=================================================

diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index e3d5640..4f2dcdd 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -39,7 +39,9 @@

#ifdef USE_WIN32API
#include <winsock2.h>
+#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
+#endif
#define close(fd) closesocket (fd)
#define ioctl ioctlsocket
#else

[-- Attachment #2: diff-mingw64.patch --]
[-- Type: application/octet-stream, Size: 306 bytes --]

diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index e3d5640..4f2dcdd 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -39,7 +39,9 @@

#ifdef USE_WIN32API
#include <winsock2.h>
+#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
+#endif
#define close(fd) closesocket (fd)
#define ioctl ioctlsocket
#else