build: make sure memfd_create is found

This commit is contained in:
Wim Taymans 2017-11-24 18:58:22 +01:00
parent 4516fcecc4
commit f902a34290

View file

@ -117,7 +117,7 @@ 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>')
if cc.has_function('memfd_create', prefix : '#include <sys/mman.h>', args : [ '-D__USE_GNU' ])
cdata.set('HAVE_MEMFD_CREATE', 1)
endif