aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2021-02-03 10:19:27 -0600
committerJory Pratt <anarchy@gentoo.org>2021-02-03 10:19:27 -0600
commitb1ffa4526aea7e30f2378c6d59f7f2da78164c0e (patch)
tree6f8fd25130903e7b43b9fc3a9607891209adb342 /net-misc
parentnet-misc/networkmanager: Fix reallocarray error (diff)
downloadmusl-b1ffa4526aea7e30f2378c6d59f7f2da78164c0e.tar.gz
musl-b1ffa4526aea7e30f2378c6d59f7f2da78164c0e.tar.bz2
musl-b1ffa4526aea7e30f2378c6d59f7f2da78164c0e.zip
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@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/files/reallocarray-1.patch43
-rw-r--r--net-misc/networkmanager/files/reallocarray.patch22
-rw-r--r--net-misc/networkmanager/networkmanager-1.26.4.ebuild2
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 <anarchy@gentoo.org>
+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() {