diff options
author | Jory Pratt <anarchy@gentoo.org> | 2021-02-03 09:40:11 -0600 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2021-02-03 09:40:11 -0600 |
commit | 424c11684631ac417069214602b73a064524898d (patch) | |
tree | eaa1b65b1e4cbb1719be7825564d574b0f9059ed /net-misc | |
parent | media-tv/kodi: sync with ::gentoo (diff) | |
download | musl-424c11684631ac417069214602b73a064524898d.tar.gz musl-424c11684631ac417069214602b73a064524898d.tar.bz2 musl-424c11684631ac417069214602b73a064524898d.zip |
net-misc/networkmanager: Fix reallocarray error
Closes: https://github.com/gentoo/musl/issues/372
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.patch | 22 | ||||
-rw-r--r-- | net-misc/networkmanager/networkmanager-1.26.4.ebuild | 3 |
2 files changed, 24 insertions, 1 deletions
diff --git a/net-misc/networkmanager/files/reallocarray.patch b/net-misc/networkmanager/files/reallocarray.patch new file mode 100644 index 00000000..98722f02 --- /dev/null +++ b/net-misc/networkmanager/files/reallocarray.patch @@ -0,0 +1,22 @@ +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 ff6099ba..50d95a09 100644 --- a/net-misc/networkmanager/networkmanager-1.26.4.ebuild +++ b/net-misc/networkmanager/networkmanager-1.26.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -108,6 +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 ) python_check_deps() { |