Alex Riesen <raa.lkml@gmail.com> writes: > For reasons unknown, cygwin decided to use our sockaddr_storage. > As it is redefined to sockaddr_in it'd cause compilation errors in > cygwin headers. Just removing "-Dsockaddr_storage=sockaddr_in" from ALL_CFLAGS seems to solve the problem for new Cygwin. I doubt that -Dsockaddr_storage=sockaddr_in should be tied to NO_IPV6. Maybe a better approach would be something like the attached patch. Although /usr/include/cygwin/in.h seems to have struct sockaddr_in6, getaddrinfo() and friends still do not seem to be there, so NO_IPV6 still remains in effect on Cygwin. Comments? -- >8 -- [PATCH] Makefile: do not assume lack of IPV6 means no sockaddr_storage. Noticed first by Alex, that the latest Cygwin now properly has sockaddr_storage. Signed-off-by: Junio C Hamano <junkio@cox.net> --- Makefile | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) 0b61a10bb258ae0971bce3e01e40a5a9e5d9537f diff --git a/Makefile b/Makefile index f6d9e0a..e8f4b24 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,9 @@ all: # # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). # +# Define NO_SOCKADDR_STORAGE if your platform does not have struct +# sockaddr_storage. +# # Define COLLISION_CHECK below if you believe that SHA1's # 1461501637330902918203684832716283019655932542976 hashes do not give you # sufficient guarantee that no collisions between objects will ever happen. @@ -342,7 +345,14 @@ ifdef NO_MMAP COMPAT_OBJS += compat/mmap.o endif ifdef NO_IPV6 - ALL_CFLAGS += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in + ALL_CFLAGS += -DNO_IPV6 +endif +ifdef NO_SOCKADDR_STORAGE +ifdef NO_IPV6 + ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in +else + ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in6 +endif endif ifdef PPC_SHA1 -- 1.1.3-gacdd - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Fri Jan 20 12:14:42 2006
This archive was generated by hypermail 2.1.8 : 2006-01-20 12:14:51 EST