summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/networkmanager/APKBUILD4
-rw-r--r--user/networkmanager/reallocarray.patch35
2 files changed, 38 insertions, 1 deletions
diff --git a/user/networkmanager/APKBUILD b/user/networkmanager/APKBUILD
index 84ca876f8..143410f2a 100644
--- a/user/networkmanager/APKBUILD
+++ b/user/networkmanager/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=networkmanager
pkgver=1.22.14
-pkgrel=2
+pkgrel=3
pkgdesc="Network management daemon"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch="all"
@@ -21,6 +21,7 @@ source="https://download.gnome.org/sources/NetworkManager/${pkgver%.*}/NetworkMa
qsort_r.patch
random.patch
tests.patch
+ reallocarray.patch
01-org.freedesktop.NetworkManager.rules
10-openrc-status
@@ -97,6 +98,7 @@ b0b85294c19510893ba30cf3d0e1984430c451273d4eb545760de52c69866a5ed0385f9c14a9bc18
5142bf14ac5574a3ae4bc8753055c534702892871ca45a1bc4d48d4d5c07d11bd54e52861458a673c328d129cdd6f1f749a9546eba1c16fea5173f92840506de qsort_r.patch
d81a962e32e696ca713dfcf1f8dbd9a146f94473c391f1977198ca67e11a6d427a265bacbe43197e42b442cfaa882e9fd2bba7548872586d53d3caca76263e79 random.patch
602859c1c7b63984b3b9d9597772e4bff496b3838eb0131ad1d707ae9226c5bdd703080683e48bc93b9c1a6572505dad0332d63c57e6320e63c011931877233a tests.patch
+d1250987879d9d660932065953d35c620a15b7242f07e676855b68d0698348e8f54dce43fa67c53f470a10f7c8a16a9834af82ba9299da0e74c7687073e89a6f reallocarray.patch
5ae288073ddc818cc5a0103a9320ebcbd80bccbba9f823335c1c602c25e48e041990370e6d091d9796e543222a7a58625ce832022d450b9a9dd49df4ed6e1ed9 01-org.freedesktop.NetworkManager.rules
26f962cea0b6a75549d16c19a71e3559239b08b001927882702f5d9355a2cc95f7b13c581439f758a950d9a5bfb73b86ba61a5ffb22c9abe19f5b05fe5f5834a 10-openrc-status
f8c9331834cbc66ab0e4e6f4a120fde6a08a435d680a1e1087718fdbb2b9843a313e7ec30b7008822999dafd98e152aa7d2a96f87320ba9c91c3adb63e0b7c9a nm.confd
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 :