diff --git a/hfsutils/hpwd.c b/hfsutils/hpwd.c index cd3b100b2e..84c34cf243 100644 --- a/hfsutils/hpwd.c +++ b/hfsutils/hpwd.c @@ -24,6 +24,7 @@ # endif # include +# include # include "hfs.h" # include "hcwd.h" diff --git a/libelf/src/elf_update.c b/libelf/src/elf_update.c index 8ce0782911..063acb54d3 100644 --- a/libelf/src/elf_update.c +++ b/libelf/src/elf_update.c @@ -80,6 +80,7 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) if (elf->map_address != NULL) { +#ifndef __APPLE__ /* When using mmap we want to make sure the file content is really there. Only using ftruncate might mean the file is extended, but space isn't allocated yet. This might cause a @@ -100,7 +101,7 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) __libelf_seterrno (ELF_E_WRITE_ERROR); return -1; } - +#endif /* The file is mmaped. */ if ((class == ELFCLASS32 ? __elf32_updatemmap (elf, change_bo, shnum)