Only define memfd_create when not already defined

This commit is contained in:
Wim Taymans 2017-11-24 17:23:40 +01:00
parent bde1012c5c
commit 2a86814bb8
3 changed files with 7 additions and 0 deletions

View file

@ -117,6 +117,10 @@ if cc.has_function('mkstemp', prefix : '#include <stdlib.h>')
cdata.set('HAVE_MKSTEMP', 1)
endif
if cc.has_function('memfd_create', prefix : '#include <sys/mman.h>')
cdata.set('HAVE_MEMFD_CREATE', 1)
endif
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)