aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/util-linux/patches/030-meson-don-t-use-run.patch
blob: 7803dd7725ff218057a774234ef25d5c5d0bebb4 (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
31
32
33
34
From e25db9169450d3d5fb43656a2eae5c08999310f4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 29 Apr 2022 16:56:54 -0700
Subject: [PATCH 2/7] meson: don't use run

Fixes cross compilation. run is not needed anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/meson.build
+++ b/meson.build
@@ -577,8 +577,7 @@ int main(void) {
   return tzname ? 0 : 1;
 }
 '''.format(have ? 1 : 0)
-result = cc.run(code, name : 'using tzname[]')
-have = result.compiled() and result.returncode() == 0
+have = cc.compiles(code, name : 'using tzname[]')
 conf.set('HAVE_TZNAME', have ? 1 : false)
 
 socket_libs = []
@@ -641,8 +640,7 @@ int main(void) {
     return (*__progname != 0);
 }
 '''
-result = cc.run(code, name : 'using __progname')
-have = result.compiled() and result.returncode() == 0
+have = cc.compiles(code, name : 'using __progname')
 conf.set('HAVE___PROGNAME', have ? 1 : false)
 
 build_plymouth_support = get_option('build-plymouth-support')