On Fri, Sep 5, 2025 at 4:48 AM Richard Henderson < richard.hender...@linaro.org> wrote:
> On 9/5/25 09:31, Paolo Bonzini wrote: > > On 9/4/25 17:21, Peter Foley wrote: > >> We're getting errors about this: > >> linux-user/elfload.c:2770:36: error: use of undeclared identifier > 'MAP_FIXED_NOREPLACE' > > > > Queued, thanks. > > > > Paolo > > > >> > >> Signed-off-by: Peter Foley <pefo...@google.com> > >> --- > >> linux-user/elfload.c | 1 + > >> linux-user/mmap.c | 1 + > >> linux-user/syscall.c | 1 + > >> 3 files changed, 3 insertions(+) > >> > >> diff --git a/linux-user/elfload.c b/linux-user/elfload.c > >> index > 26c090c95d3e90ad4a23a927267e4106f68975b0..edbacf041f25d88472c95efb4eb9bdccd81e9902 > > >> 100644 > >> --- a/linux-user/elfload.c > >> +++ b/linux-user/elfload.c > >> @@ -5,6 +5,7 @@ > >> #include <sys/prctl.h> > >> #include <sys/resource.h> > >> #include <sys/shm.h> > >> +#include <linux/mman.h> > > There's no reason to include <linux/mman.h>. > > This value is provided by <sys/mman.h> directly for musl and by > <sys/mman.h> via > <bits/mman-map-flags*> for glibc. > > Are you using some other libc? You're solidly in non-standard territory > there. > Perhaps that other libc needs updating. > We're using glibc 2.27. I definitely saw build failures earlier without this patch, but I'm now unable to reproduce them at head. So maybe there was an issue with our headers at an earlier point that has since been fixed? I'll revert this patch from our local fork and you should probably drop it upstream as well. > > r~ >