Signed-off-by: Khem Raj <[email protected]>
---
 .../networkmanager/fix_reallocarray_check.patch  | 16 ++++++++++++++++
 .../networkmanager/networkmanager_1.22.14.bb     |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch

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..291424b5b5
--- /dev/null
+++ 
b/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch
@@ -0,0 +1,16 @@
+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 <[email protected]>
+--- 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>'))
+ 
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 \
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#88279): 
https://lists.openembedded.org/g/openembedded-devel/message/88279
Mute This Topic: https://lists.openembedded.org/mt/78919295/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to