--- qemu-2.10.0-clean/util/memfd.c	2019-08-01 23:04:12.562396563 +0200
+++ qemu-2.10.0/util/memfd.c	2019-08-01 23:06:47.882646792 +0200
@@ -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>
 
