From ed2125262bd22ee90d9745c26a34c3969b114c4e Mon Sep 17 00:00:00 2001 From: liaochengjie <1258407709@qq.com> Date: Sun, 17 Mar 2024 06:28:46 -0700 Subject: [PATCH] memfd: fix configure test --- configure | 2 +- util/memfd.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index dd73cce..53581d7 100755 --- a/configure +++ b/configure @@ -3855,7 +3855,7 @@ fi # check if memfd is supported memfd=no cat > $TMPC << EOF -#include +#include int main(void) { diff --git a/util/memfd.c b/util/memfd.c index 4571d1a..412e94a 100644 --- a/util/memfd.c +++ b/util/memfd.c @@ -31,9 +31,7 @@ #include "qemu/memfd.h" -#ifdef CONFIG_MEMFD -#include -#elif defined CONFIG_LINUX +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD #include #include