Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-support / cluster-resource-agents / resource-agents / 0003-fix-header-defs-lookup.patch
1 From 6f3f2d6c129577f8666aee7b506d0b52a58bba0e Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Mon, 27 Apr 2020 11:53:55 +0800
4 Subject: [PATCH 3/4] fix header defs lookup
5
6 Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
7
8 Rebase for 4.1.1
9
10 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
11 ---
12  configure.ac | 5 ++---
13  1 file changed, 2 insertions(+), 3 deletions(-)
14
15 diff --git a/configure.ac b/configure.ac
16 index e1ed2e8..4d5fb96 100644
17 --- a/configure.ac
18 +++ b/configure.ac
19 @@ -148,9 +148,8 @@ extract_header_define() {
20           Cfile=$srcdir/extract_define.$2.${$}
21           printf "#include <stdio.h>\n" > ${Cfile}.c
22           printf "#include <%s>\n" $1 >> ${Cfile}.c
23 -         printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
24 -         $CC $CFLAGS ${Cfile}.c -o ${Cfile}
25 -         value=`${Cfile}`
26 +         printf "\"%s\":%s\n" $2 $2 >> ${Cfile}.c
27 +         value=`$CC $CFLAGS -E ${Cfile}.c | grep \"$2\" | cut -f 2 -d ':'`
28           AC_MSG_RESULT($value)
29           printf $value
30           rm -f ${Cfile}.c ${Cfile}
31 -- 
32 2.7.4
33