diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-08-09 06:15:13 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-08-09 06:15:13 +0000 |
| commit | 803f712332e7bcafbb3b41b69ed5787b6b032bbf (patch) | |
| tree | 9f61ef47ad122192e332a06de7507078345b6568 | |
| parent | meson: fix false positive detection of `memfd_create` (diff) | |
meson: add "prefix: '#include <unistd.h>" to cc.has_function()
When checking for execvpe, include <unistd.h>
| -rw-r--r-- | meson.build | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 7ce9d901..2bec645e 100644 --- a/meson.build +++ b/meson.build @@ -13,12 +13,15 @@ is_debug_build = get_option('buildtype').startswith('debug') cc = meson.get_compiler('c') if cc.has_function('memfd_create', - args: ['-D_GNU_SOURCE'], prefix: '#include <sys/mman.h>') + args: ['-D_GNU_SOURCE'], + prefix: '#include <sys/mman.h>') add_project_arguments('-DMEMFD_CREATE', language: 'c') endif # Missing on DragonFly, FreeBSD < 14.1 -if cc.has_function('execvpe') +if cc.has_function('execvpe', + args: ['-D_GNU_SOURCE'], + prefix: '#include <unistd.h>') add_project_arguments('-DEXECVPE', language: 'c') endif |
