commit: b1ffa4526aea7e30f2378c6d59f7f2da78164c0e Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> AuthorDate: Wed Feb 3 16:19:27 2021 +0000 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> CommitDate: Wed Feb 3 16:19:27 2021 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=b1ffa452
net-misc/networkmanager: Update reallocarray patch for autotools build Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> net-misc/networkmanager/files/reallocarray-1.patch | 43 ++++++++++++++++++++++ net-misc/networkmanager/files/reallocarray.patch | 22 ----------- .../networkmanager/networkmanager-1.26.4.ebuild | 2 +- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/net-misc/networkmanager/files/reallocarray-1.patch b/net-misc/networkmanager/files/reallocarray-1.patch new file mode 100644 index 0000000..2cc703f --- /dev/null +++ b/net-misc/networkmanager/files/reallocarray-1.patch @@ -0,0 +1,43 @@ +From 6f6c844ab880d5535a05dd341643a28f7afeb6ec Mon Sep 17 00:00:00 2001 +From: Jory Pratt <[email protected]> +Date: Wed, 3 Feb 2021 09:58:22 -0600 +Subject: [PATCH] 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 +--- + configure | 2 +- + configure.ac | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index 40eed6c..4d12779 100755 +--- a/configure ++++ b/configure +@@ -18252,7 +18252,7 @@ _ACEOF + + 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 : + ac_have_decl=1 +diff --git a/configure.ac b/configure.ac +index 0d448f3..bfc1972 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,7 @@ AC_CHECK_DECLS([ + reallocarray], + [], [], [[ + #include <malloc.h> ++#include <stdlib.h> + ]]) + + AC_CHECK_DECLS([ +-- +2.26.2 + diff --git a/net-misc/networkmanager/files/reallocarray.patch b/net-misc/networkmanager/files/reallocarray.patch deleted file mode 100644 index 98722f0..0000000 --- a/net-misc/networkmanager/files/reallocarray.patch +++ /dev/null @@ -1,22 +0,0 @@ -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>')) - diff --git a/net-misc/networkmanager/networkmanager-1.26.4.ebuild b/net-misc/networkmanager/networkmanager-1.26.4.ebuild index 50d95a0..eec7261 100644 --- a/net-misc/networkmanager/networkmanager-1.26.4.ebuild +++ b/net-misc/networkmanager/networkmanager-1.26.4.ebuild @@ -108,7 +108,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.26.4-iwd-fixes-pr640.patch "${FILESDIR}"/musl-process-util.patch "${FILESDIR}"/musl-compar.patch "${FILESDIR}"/musl-no-drand.patch - "${FILESDIR}"/reallocarray.patch + "${FILESDIR}"/reallocarray-1.patch ) python_check_deps() {
