[build] meson misdetects mempcpy on some platforms
(thx devnexen)
x-ref:
"Meson misdetects some functions with mingw-w64"
"Solaris build fix proposal"
"netbsd meson build fix"
@@ -130,7 +130,7 @@ conf_data.set('HAVE_MADVISE', compiler.has_function('madvise', args: defs))
conf_data.set('HAVE_MALLOC_TRIM', compiler.has_function('malloc_trim', args: defs))
conf_data.set('HAVE_MALLOPT', compiler.has_function('mallopt', args: defs))
conf_data.set('HAVE_MEMCPY', compiler.has_function('memcpy', args: defs))
-conf_data.set('HAVE_MEMPCPY', compiler.has_function('mempcpy', args: defs))
+conf_data.set('HAVE_MEMPCPY', compiler.has_function('mempcpy', args: defs, prefix: '#include <string.h>'))
conf_data.set('HAVE_MEMSET', compiler.has_function('memset', args: defs))
conf_data.set('HAVE_MKOSTEMP', compiler.has_function('mkostemp', args: defs))
conf_data.set('HAVE_MMAP', compiler.has_function('mmap', args: defs))
