diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 34d37d8f3..95ff1a24d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2012-03-13 Corinna Vinschen + + * include/netdb.h (h_errno): Add self-referencing macro and comment. + 2012-03-12 Corinna Vinschen Christopher Faylor diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h index 69ef72765..f59a780f0 100644 --- a/winsup/cygwin/include/netdb.h +++ b/winsup/cygwin/include/netdb.h @@ -137,6 +137,9 @@ struct addrinfo { extern int h_errno; #else extern __declspec(dllimport) int h_errno; +/* Some packages expect h_errno to be a macro, otherwise they redeclare + h_errno, which leads to spurious warnings. */ +#define h_errno h_errno #endif #define NETDB_INTERNAL -1 /* see errno */