summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2b0026)
raw | patch | inline | side by side (parent: b2b0026)
author | Gary V. Vaughan <git@mlists.thewrittenword.com> | |
Fri, 14 May 2010 09:31:39 +0000 (09:31 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 1 Jun 2010 00:36:27 +0000 (17:36 -0700) |
Some platforms with mmap() lack MAP_FAILED definition.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index 7e62b552700a580646dbb6a8921c40761d6b57a2..cd3022e99f820074feb33d3ee55c75f0534b31b8 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#define PROT_READ 1
#define PROT_WRITE 2
#define MAP_PRIVATE 1
-#define MAP_FAILED ((void*)-1)
#endif
#define mmap git_mmap
#endif /* NO_MMAP */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
#define on_disk_bytes(st) ((st).st_size)
#else