From 9b4d1964a7c3c5eac7373ffbe1a7cace7ef77556 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 10 Oct 2012 08:36:33 +0000 Subject: [PATCH] * include/cygwin/in.h (struct in_addr): Guard with s_addr to avoid potential collision with Win32 headers. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/include/cygwin/in.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f5d8808d7..71386a06e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-10-10 Corinna Vinschen + + * include/cygwin/in.h (struct in_addr): Guard with s_addr to avoid + potential collision with Win32 headers. + 2012-10-09 Christopher Faylor * child_info.h (child_info_spawn::has_execed): Remove unneeded diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h index 49957293d..a64160e8f 100644 --- a/winsup/cygwin/include/cygwin/in.h +++ b/winsup/cygwin/include/cygwin/in.h @@ -112,11 +112,15 @@ enum IPPORT_USERRESERVED = 5000 }; +/* Avoid collision with Mingw64 headers. */ +#ifndef s_addr /* Internet address. */ struct in_addr { in_addr_t s_addr; }; +#define s_addr s_addr +#endif /* Request struct for IPv4 multicast socket ops */