aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-12-12 16:34:22 -0800
committerKhem Raj <raj.khem@gmail.com>2020-12-12 16:41:59 -0800
commit62c2f4a48a244ead00d4b32f42b10f52441afc1c (patch)
tree65d9e237d90303a6c7e667a2c05659ec74d578bd
parent4a171790a66c6adb5bf0994c9b2c85a1ea0b8ce8 (diff)
downloadmeta-openembedded-contrib-62c2f4a48a244ead00d4b32f42b10f52441afc1c.tar.gz
meta-openembedded-contrib-62c2f4a48a244ead00d4b32f42b10f52441afc1c.tar.bz2
meta-openembedded-contrib-62c2f4a48a244ead00d4b32f42b10f52441afc1c.zip
networkmanager: Fix reallocarray check in meson and configure
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch27
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb1
2 files changed, 28 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch
new file mode 100644
index 0000000000..0a8de54106
--- /dev/null
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch
@@ -0,0 +1,27 @@
+reallocarray() is coming from stdlib.h which maybe indirectly included
+by malloc.h but not on all libc implementations
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/meson.build
++++ b/meson.build
+@@ -114,7 +114,7 @@ config_h.set10('HAVE_GETRANDOM', use_sys
+ # FIXME secure_getenv check is not useful?
+ 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>'))
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,7 +82,7 @@ AC_CHECK_DECLS([
+ AC_CHECK_DECLS([
+ reallocarray],
+ [], [], [[
+-#include <malloc.h>
++#include <stdlib.h>
+ ]])
+
+ AC_CHECK_DECLS([
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb
index 2613076a7e..aa8ab899bb 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb
@@ -27,6 +27,7 @@ SRC_URI = " \
file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
file://0002-Do-not-create-settings-settings-property-documentati.patch \
file://0001-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \
+ file://fix_reallocarray_check.patch \
"
SRC_URI_append_libc-musl = " \
file://musl/0001-Fix-build-with-musl-systemd-specific.patch \