From: Gary V. Vaughan Date: Fri, 14 May 2010 09:31:39 GMT Subject: [PATCH v5 08/18] git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition Message-ID: <20100514093802.235245000@mlists.thewrittenword.com> In-Reply-To: <20100514093131.249094000@mlists.thewrittenword.com> Some platforms with mmap() lack MAP_FAILED definition. Signed-off-by: Gary V. Vaughan --- git-compat-util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: b/git-compat-util.h =================================================================== --- a/git-compat-util.h +++ b/git-compat-util.h @@ -217,7 +217,6 @@ static inline const char *skip_prefix(co #define PROT_READ 1 #define PROT_WRITE 2 #define MAP_PRIVATE 1 -#define MAP_FAILED ((void*)-1) #endif #define mmap git_mmap @@ -246,6 +245,10 @@ extern int git_munmap(void *start, size_ #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 -- Gary V. Vaughan (gary@thewrittenword.com)