git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
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>
This commit is contained in:

committed by
Junio C Hamano

parent
b2b0026eed
commit
fcf3a21acc
@ -217,7 +217,6 @@ static inline const char *skip_prefix(const char *str, const char *prefix)
|
|||||||
#define PROT_READ 1
|
#define PROT_READ 1
|
||||||
#define PROT_WRITE 2
|
#define PROT_WRITE 2
|
||||||
#define MAP_PRIVATE 1
|
#define MAP_PRIVATE 1
|
||||||
#define MAP_FAILED ((void*)-1)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define mmap git_mmap
|
#define mmap git_mmap
|
||||||
@ -246,6 +245,10 @@ extern int git_munmap(void *start, size_t length);
|
|||||||
|
|
||||||
#endif /* NO_MMAP */
|
#endif /* NO_MMAP */
|
||||||
|
|
||||||
|
#ifndef MAP_FAILED
|
||||||
|
#define MAP_FAILED ((void *)-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
|
#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
|
||||||
#define on_disk_bytes(st) ((st).st_size)
|
#define on_disk_bytes(st) ((st).st_size)
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user