The has_function check incorrectly detects mempcpy on macOS.
This function is not available on macOS and should not be detected.
Likely, this has to do with Meson's detection of compiler built-ins.
Using a specific prefix and defining _GNU_SOURCE fixes the detection.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
llistxattr
llseek
newlocale
- mempcpy
mkostemp
move_mount
mount_setattr
conf.set('HAVE_' + func.to_upper(), have ? 1 : false)
endforeach
+have_mempcpy = cc.has_function('mempcpy', prefix: '#include <string.h>', args: '-D_GNU_SOURCE')
+conf.set('HAVE_MEMPCPY', have_mempcpy ? 1 : false)
+
have = conf.get('HAVE_FUTIMENS') in [1] and conf.get('HAVE_INOTIFY_INIT1') in [1]
conf.set('AGETTY_RELOAD', have ? 1 : false)
if not have