--- memfd.c 2020-02-19 15:18:11.594376290 +0530 +++ memfd_mod.c 2020-02-19 20:22:37.287605664 +0530 @@ -32,9 +32,9 @@ #include "qemu/memfd.h" -#ifdef CONFIG_MEMFD -#include -#elif defined CONFIG_LINUX + +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD +#include #include #include