Some platforms with mmap() lack MAP_FAILED definition. Signed-off-by: Gary V. Vaughan <gary@xxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxx) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html