From 3236f3cfbf48784675b25258ebb4d71816f8ad1f Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sat, 6 Feb 2021 15:23:15 +0100 Subject: [PATCH] deal with stricter default compile options for C --- hfsutils/hpwd.c | 1 + libelf/src/elf_update.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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)