Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
Date: Wed, 03 Feb 2021 16:19:37
Message-Id: 1612369167.b1ffa4526aea7e30f2378c6d59f7f2da78164c0e.anarchy@gentoo
1 commit: b1ffa4526aea7e30f2378c6d59f7f2da78164c0e
2 Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 3 16:19:27 2021 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 3 16:19:27 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=b1ffa452
7
8 net-misc/networkmanager: Update reallocarray patch for autotools build
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>
12
13 net-misc/networkmanager/files/reallocarray-1.patch | 43 ++++++++++++++++++++++
14 net-misc/networkmanager/files/reallocarray.patch | 22 -----------
15 .../networkmanager/networkmanager-1.26.4.ebuild | 2 +-
16 3 files changed, 44 insertions(+), 23 deletions(-)
17
18 diff --git a/net-misc/networkmanager/files/reallocarray-1.patch b/net-misc/networkmanager/files/reallocarray-1.patch
19 new file mode 100644
20 index 0000000..2cc703f
21 --- /dev/null
22 +++ b/net-misc/networkmanager/files/reallocarray-1.patch
23 @@ -0,0 +1,43 @@
24 +From 6f6c844ab880d5535a05dd341643a28f7afeb6ec Mon Sep 17 00:00:00 2001
25 +From: Jory Pratt <anarchy@g.o>
26 +Date: Wed, 3 Feb 2021 09:58:22 -0600
27 +Subject: [PATCH] musl [added support for reallocarray](0), but the function
28 + prototype is declared in `stdlib.h` instead of `malloc.h`.
29 +
30 +Update the check for reallocarray to check both in `malloc.h` and
31 +`stdlib.h`.
32 +
33 +[0]:https://git.musl-libc.org/cgit/musl/commit/?id=821083ac7b54eaa040d5a8ddc67c6206a175e0ca
34 +---
35 + configure | 2 +-
36 + configure.ac | 1 +
37 + 2 files changed, 2 insertions(+), 1 deletion(-)
38 +
39 +diff --git a/configure b/configure
40 +index 40eed6c..4d12779 100755
41 +--- a/configure
42 ++++ b/configure
43 +@@ -18252,7 +18252,7 @@ _ACEOF
44 +
45 + ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "
46 + #include <malloc.h>
47 +-
48 ++#include <stdlib.h>
49 + "
50 + if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
51 + ac_have_decl=1
52 +diff --git a/configure.ac b/configure.ac
53 +index 0d448f3..bfc1972 100644
54 +--- a/configure.ac
55 ++++ b/configure.ac
56 +@@ -83,6 +83,7 @@ AC_CHECK_DECLS([
57 + reallocarray],
58 + [], [], [[
59 + #include <malloc.h>
60 ++#include <stdlib.h>
61 + ]])
62 +
63 + AC_CHECK_DECLS([
64 +--
65 +2.26.2
66 +
67
68 diff --git a/net-misc/networkmanager/files/reallocarray.patch b/net-misc/networkmanager/files/reallocarray.patch
69 deleted file mode 100644
70 index 98722f0..0000000
71 --- a/net-misc/networkmanager/files/reallocarray.patch
72 +++ /dev/null
73 @@ -1,22 +0,0 @@
74 -musl [added support for reallocarray](0), but the function prototype is
75 -declared in `stdlib.h` instead of `malloc.h`.
76 -
77 -Update the check for reallocarray to check both in `malloc.h` and
78 -`stdlib.h`.
79 -
80 -[0]:https://git.musl-libc.org/cgit/musl/commit/?id=821083ac7b54eaa040d5a8ddc67c6206a175e0ca
81 -
82 -diff --git a/meson.build b/meson.build
83 -index 22a3c4c..12a10c5 100644
84 ---- a/meson.build
85 -+++ b/meson.build
86 -@@ -126,7 +126,8 @@ config_h.set10('HAVE_RT_SIGQUEUEINFO', cc.has_function('rt_sigqueueinfo', prefix
87 - #include <sys/wait.h>'''))
88 - config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
89 - config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
90 --config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
91 -+config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '''#include <malloc.h>
92 -+ #include <stdlib.h>'''))
93 - config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
94 - config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
95 -
96
97 diff --git a/net-misc/networkmanager/networkmanager-1.26.4.ebuild b/net-misc/networkmanager/networkmanager-1.26.4.ebuild
98 index 50d95a0..eec7261 100644
99 --- a/net-misc/networkmanager/networkmanager-1.26.4.ebuild
100 +++ b/net-misc/networkmanager/networkmanager-1.26.4.ebuild
101 @@ -108,7 +108,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.26.4-iwd-fixes-pr640.patch
102 "${FILESDIR}"/musl-process-util.patch
103 "${FILESDIR}"/musl-compar.patch
104 "${FILESDIR}"/musl-no-drand.patch
105 - "${FILESDIR}"/reallocarray.patch
106 + "${FILESDIR}"/reallocarray-1.patch
107 )
108
109 python_check_deps() {