summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-meson-Fix-reallocarray-check.patch
blob: 1229dd6e175aa2a69c29537ce544cef28acdfa6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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