meson: fix misdetection of memfd_create()

This commit is contained in:
Daniel Eklöf 2024-08-07 17:27:26 +02:00
parent 1a323c6d21
commit 3e0a65f185
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -12,7 +12,9 @@ plugs_as_libs = get_option('core-plugins-as-shared-libraries')
cc = meson.get_compiler('c')
if cc.has_function('memfd_create')
if cc.has_function('memfd_create',
args: ['-D_GNU_SOURCE=200809L'],
prefix: '#include <sys/mman.h>')
add_project_arguments('-DMEMFD_CREATE', language: 'c')
endif