diff options
author | Marc-André Lureau | 2015-10-09 17:17:16 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2015-10-22 13:34:48 +0200 |
commit | 751bcc3981d80594a3943166401af15b76781a5b (patch) | |
tree | 30f956e0a8972803b237905913b79e198b716113 /configure | |
parent | virtio: add some migration doc (diff) | |
download | qemu-751bcc3981d80594a3943166401af15b76781a5b.tar.gz qemu-751bcc3981d80594a3943166401af15b76781a5b.tar.xz qemu-751bcc3981d80594a3943166401af15b76781a5b.zip |
configure: probe for memfd
Check if memfd_create() is part of system libc.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -3495,6 +3495,22 @@ if compile_prog "" "" ; then eventfd=yes fi +# check if memfd is supported +memfd=no +cat > $TMPC << EOF +#include <sys/memfd.h> + +int main(void) +{ + return memfd_create("foo", MFD_ALLOW_SEALING); +} +EOF +if compile_prog "" "" ; then + memfd=yes +fi + + + # check for fallocate fallocate=no cat > $TMPC << EOF @@ -4889,6 +4905,9 @@ fi if test "$eventfd" = "yes" ; then echo "CONFIG_EVENTFD=y" >> $config_host_mak fi +if test "$memfd" = "yes" ; then + echo "CONFIG_MEMFD=y" >> $config_host_mak +fi if test "$fallocate" = "yes" ; then echo "CONFIG_FALLOCATE=y" >> $config_host_mak fi |