fsck-objects: support platforms without d_ino in struct dirent.
[gitweb.git] / Makefile
index a291bb157ec9eb14037bcc2a2f7b238527dc7adb..334fe4ec414d42b644f486da0253545f2e44c91b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,8 @@ all:
 # Define NO_EXPAT if you do not have expat installed.  git-http-push is
 # not built, and you cannot push using http:// and https:// transports.
 #
+# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
+#
 # Define NO_STRCASESTR if you don't have strcasestr.
 #
 # Define NO_SETENV if you don't have setenv in the C library.
@@ -45,6 +47,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.
@@ -231,6 +236,7 @@ ifeq ($(uname_S),SunOS)
        ALL_CFLAGS += -D__EXTENSIONS__
 endif
 ifeq ($(uname_O),Cygwin)
+       NO_D_INO_IN_DIRENT = YesPlease
        NO_STRCASESTR = YesPlease
        NEEDS_LIBICONV = YesPlease
        # There are conflicting reports about this.
@@ -331,6 +337,9 @@ ifdef NEEDS_NSL
        LIBS += -lnsl
        SIMPLE_LIB += -lnsl
 endif
+ifdef NO_D_INO_IN_DIRENT
+       ALL_CFLAGS += -DNO_D_INO_IN_DIRENT
+endif
 ifdef NO_STRCASESTR
        COMPAT_CFLAGS += -DNO_STRCASESTR
        COMPAT_OBJS += compat/strcasestr.o
@@ -344,7 +353,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