1 #ifndef LIBELF_COMPAT_H
2 #define LIBELF_COMPAT_H
4 #if defined(NO_MMAP_FILE)
9 #define PROT_READ 0x01 /* pages can be read */
10 #define MAP_PRIVATE 0x0002 /* changes are private */
13 * Error indicator returned by mmap(2)
15 #define MAP_FAILED ((void *) -1) /* mmap() failed */
18 #define mmap libelf_mmap
19 #define munmap libelf_munmap
20 void* libelf_mmap(void *addr
, size_t len
, int prot
, int flags
, int fd
, off_t offset
);
21 int libelf_munmap(void *addr
, size_t len
);
23 #else /* ! NO_MMAP_FILE */
27 #endif /* NO_MMAP_FILE */
29 #endif /* LIBELF_COMPAT_H */