mirror of https://gitee.com/openkylin/qemu.git
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: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
200780a3a3
commit
75e5b70e6b
|
@ -3923,7 +3923,7 @@ fi
|
||||||
# check if memfd is supported
|
# check if memfd is supported
|
||||||
memfd=no
|
memfd=no
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <sys/memfd.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,9 +31,7 @@
|
||||||
|
|
||||||
#include "qemu/memfd.h"
|
#include "qemu/memfd.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MEMFD
|
#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
|
||||||
#include <sys/memfd.h>
|
|
||||||
#elif defined CONFIG_LINUX
|
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue