util-linux: use meson to build
[openwrt/staging/chunkeey.git] / package / utils / util-linux / patches / 030-meson-don-t-use-run.patch
1 From e25db9169450d3d5fb43656a2eae5c08999310f4 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Fri, 29 Apr 2022 16:56:54 -0700
4 Subject: [PATCH 2/7] meson: don't use run
5
6 Fixes cross compilation. run is not needed anyway.
7
8 Signed-off-by: Rosen Penev <rosenp@gmail.com>
9 ---
10 meson.build | 6 ++----
11 1 file changed, 2 insertions(+), 4 deletions(-)
12
13 --- a/meson.build
14 +++ b/meson.build
15 @@ -577,8 +577,7 @@ int main(void) {
16 return tzname ? 0 : 1;
17 }
18 '''.format(have ? 1 : 0)
19 -result = cc.run(code, name : 'using tzname[]')
20 -have = result.compiled() and result.returncode() == 0
21 +have = cc.compiles(code, name : 'using tzname[]')
22 conf.set('HAVE_TZNAME', have ? 1 : false)
23
24 socket_libs = []
25 @@ -641,8 +640,7 @@ int main(void) {
26 return (*__progname != 0);
27 }
28 '''
29 -result = cc.run(code, name : 'using __progname')
30 -have = result.compiled() and result.returncode() == 0
31 +have = cc.compiles(code, name : 'using __progname')
32 conf.set('HAVE___PROGNAME', have ? 1 : false)
33
34 build_plymouth_support = get_option('build-plymouth-support')