Commit 75e5b70e authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

memfd: fix configure test



Recent glibc added memfd_create in sys/mman.h.  This conflicts with
the definition in util/memfd.c:

    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration

Fix the configure test, and remove the sys/memfd.h inclusion since the
file actually does not exist---it is a typo in the memfd_create(2) man
page.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 200780a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3923,7 +3923,7 @@ fi
# check if memfd is supported
memfd=no
cat > $TMPC << EOF
#include <sys/memfd.h>
#include <sys/mman.h>

int main(void)
{
+1 −3
Original line number Diff line number Diff line
@@ -31,9 +31,7 @@

#include "qemu/memfd.h"

#ifdef CONFIG_MEMFD
#include <sys/memfd.h>
#elif defined CONFIG_LINUX
#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
#include <sys/syscall.h>
#include <asm/unistd.h>