diff options
author | Zach van Rijn <me@zv.io> | 2022-05-27 21:03:17 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-10-21 18:34:01 -0500 |
commit | 0c6602582f5e31147131688ef183d8785c4d51e1 (patch) | |
tree | 34a179d8e29735e42a66a65c46f3030b1ee2e2f9 /user/networkmanager/reallocarray.patch | |
parent | 510adaa5eac8da9ee052a4c9d5b95afebfeeff48 (diff) | |
download | packages-0c6602582f5e31147131688ef183d8785c4d51e1.tar.gz packages-0c6602582f5e31147131688ef183d8785c4d51e1.tar.bz2 packages-0c6602582f5e31147131688ef183d8785c4d51e1.tar.xz packages-0c6602582f5e31147131688ef183d8785c4d51e1.zip |
user/networkmanager: add patch for 'reallocarray' on musl >= 1.2.2. fixes #633.
Diffstat (limited to 'user/networkmanager/reallocarray.patch')
-rw-r--r-- | user/networkmanager/reallocarray.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/user/networkmanager/reallocarray.patch b/user/networkmanager/reallocarray.patch new file mode 100644 index 000000000..c6b5d1a38 --- /dev/null +++ b/user/networkmanager/reallocarray.patch @@ -0,0 +1,35 @@ +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 + +ZV: ported to 'configure' script + +diff --git a/meson.build b/meson.build +index 22a3c4c..12a10c5 100644 +--- a/meson.build ++++ b/meson.build +@@ -126,7 +126,7 @@ 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 <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>')) + +diff -ur a/configure b/configure +--- a/configure 2022-05-27 20:55:41.353915378 +0000 ++++ b/configure 2022-05-27 20:56:56.707077218 +0000 +@@ -18255,7 +18255,7 @@ + + + ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" " +-#include <malloc.h> ++#include <stdlib.h> + + " + if test "x$ac_cv_have_decl_reallocarray" = xyes; then : |