public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH 2/2] systemd: Fix reallocarray check
Date: Sat, 12 Dec 2020 16:34:02 -0800	[thread overview]
Message-ID: <20201213003402.3469450-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20201213003402.3469450-1-raj.khem@gmail.com>

Musl brought this latent issue to fore

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-meson-Fix-reallocarray-check.patch   | 30 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_247.1.bb    |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Fix-reallocarray-check.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-meson-Fix-reallocarray-check.patch b/meta/recipes-core/systemd/systemd/0001-meson-Fix-reallocarray-check.patch
new file mode 100644
index 0000000000..1229dd6e17
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-meson-Fix-reallocarray-check.patch
@@ -0,0 +1,30 @@
+From 1ebf1a1df17afd8b89f84b1928a89069035bf20b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index d205f846c7..e0a3c53529 100644
+--- a/meson.build
++++ b/meson.build
+@@ -517,7 +517,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>
+-- 
+2.29.2
+
diff --git a/meta/recipes-core/systemd/systemd_247.1.bb b/meta/recipes-core/systemd/systemd_247.1.bb
index 951bffa23f..25d15abf02 100644
--- a/meta/recipes-core/systemd/systemd_247.1.bb
+++ b/meta/recipes-core/systemd/systemd_247.1.bb
@@ -24,6 +24,7 @@ SRC_URI += "file://touchscreen.rules \
            file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
            file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \
            file://0001-meson-set-cxx-variable-before-using-it.patch \
+           file://0001-meson-Fix-reallocarray-check.patch \
            "
 
 # patches needed by musl
-- 
2.29.2


      reply	other threads:[~2020-12-13  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13  0:34 [PATCH v2 1/2] musl: Update to latest master Khem Raj
2020-12-13  0:34 ` Khem Raj [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201213003402.3469450-2-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox