mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-23 17:42:31 +01:00
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
musl [added support for reallocarray](0), but the function prototype is
|
|
declared in `stdlib.h` instead of `malloc.h`.
|
|
|
|
Update the check for reallocarray to check both in `malloc.h` and
|
|
`stdlib.h`.
|
|
|
|
[0]:https://git.musl-libc.org/cgit/musl/commit/?id=821083ac7b54eaa040d5a8ddc67c6206a175e0ca
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 22a3c4c..12a10c5 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -126,7 +126,8 @@ config_h.set10('HAVE_RT_SIGQUEUEINFO', cc.has_function('rt_sigqueueinfo', prefix
|
|
#include <sys/wait.h>'''))
|
|
config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
|
|
config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
|
|
-config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
|
|
+config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '''#include <malloc.h>
|
|
+ #include <stdlib.h>'''))
|
|
config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
|
|
config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
|
|
|