networkmanager: Fix reallocarray check in meson
PATCH 1/2 networkmanager: Fix reallocarray check in meson
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
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch new file +16 -0
@@ -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>')) +
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.14.bb +1 -0
@@ -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 \
Signature · 1 line
2.29.2
PATCH 2/2 sdbus-c++-libsystemd: Fix reallocarray check in meson
Signed-off-by Khem Raj <[email protected]>
--- .../0001-meson-Fix-reallocarray-check.patch | 25 +++++++++++++++++++ .../sdbus-c++/sdbus-c++-libsystemd_243.bb | 1 + 2 files changed, 26 insertions(+) create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch
meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 1ebf1a1df17afd8b89f84b1928a89069035bf20b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 12 Dec 2020 16:15:57 -0800 +Subject: [PATCH] meson: Fix reallocarray check + +reallocarray() is defined in stdlib.h, so that would be right header to +check for its presense. + +Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/17951] +Signed-off-by: Khem Raj <[email protected]> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -501,7 +501,7 @@ foreach ident : [ + #include <sys/stat.h> + #include <unistd.h>'''], + ['explicit_bzero' , '''#include <string.h>'''], +- ['reallocarray', '''#include <malloc.h>'''], ++ ['reallocarray', '''#include <stdlib.h>'''], + ['set_mempolicy', '''#include <stdlib.h> + #include <unistd.h>'''], + ['get_mempolicy', '''#include <stdlib.h>
meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb +1 -0
@@ -41,6 +41,7 @@ SRC_URI_MUSL = "\ file://0002-src-login-brightness.c-include-sys-wait.h.patch \ file://0003-src-basic-copy.c-include-signal.h.patch \ file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ + file://0001-meson-Fix-reallocarray-check.patch \ " PACKAGECONFIG ??= "gshadow idn"
Signature · 1 line
2.29.2