Skip to content

Commit bdc37f5

Browse files
author
Junio C Hamano
committed
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>
1 parent eff351c commit bdc37f5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ all:
4545
#
4646
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
4747
#
48+
# Define NO_SOCKADDR_STORAGE if your platform does not have struct
49+
# sockaddr_storage.
50+
#
4851
# Define COLLISION_CHECK below if you believe that SHA1's
4952
# 1461501637330902918203684832716283019655932542976 hashes do not give you
5053
# sufficient guarantee that no collisions between objects will ever happen.
@@ -344,7 +347,14 @@ ifdef NO_MMAP
344347
COMPAT_OBJS += compat/mmap.o
345348
endif
346349
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
348358
endif
349359

350360
ifdef PPC_SHA1

0 commit comments

Comments
 (0)