[PATCH] If NO_MMAP is defined, fake mmap() and munmap()
[git.git] / Makefile
index 1bdf4de..7ca77cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
 #
+# Define NO_MMAP if you want to avoid mmap.
+#
 # Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
 #
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
@@ -258,6 +260,10 @@ ifdef NO_STRCASESTR
        DEFINES += -Dstrcasestr=gitstrcasestr
        LIB_OBJS += compat/strcasestr.o
 endif
+ifdef NO_MMAP
+       DEFINES += -Dmmap=gitfakemmap -Dmunmap=gitfakemunmap -DNO_MMAP
+       LIB_OBJS += compat/mmap.o
+endif
 ifdef NO_IPV6
        DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
 endif