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>
Junio C Hamano committed
Jan 19, 2006 at 17:13 UTC
bdc37f5a817543fc5eaf16dd6f30dd7b821adc70
1 file changed
+11
-1
Makefile
+11
-1
@@ -45,6 +45,9 @@ all:
45
#
46
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
47
#
48
+# Define NO_SOCKADDR_STORAGE if your platform does not have struct
49
+# sockaddr_storage.
50
+#
51
# Define COLLISION_CHECK below if you believe that SHA1's
52
# 1461501637330902918203684832716283019655932542976 hashes do not give you
53
# sufficient guarantee that no collisions between objects will ever happen.
@@ -344,7 +347,14 @@ ifdef NO_MMAP
347
COMPAT_OBJS += compat/mmap.o
348
endif
349
ifdef NO_IPV6
347
- ALL_CFLAGS += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
350
+ ALL_CFLAGS += -DNO_IPV6
351
+endif
352
+ifdef NO_SOCKADDR_STORAGE
353
+ifdef NO_IPV6
354
+ ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in
355
+else
356
+ ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in6
357
+endif
358
endif
359
360
ifdef PPC_SHA1