libpam: drop yylex to static force
PATCH 1/1 libpam: drop yylex to static force
Since flex was upgraded to 2.6.4, there is a build failure
...
In file included from ../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56:
configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows non-static declaration
23 | #define yyleng _pc_yyleng
| ^~~~~~~~~
configfile.lex.c:1091:28: note: in expansion of macro 'yylex'
1091 |
| ^
configfile.lex.c:1111:1: note: in expansion of macro 'YY_DECL'
1111 | */
| ^~~
configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here
23 | #define yyleng _pc_yyleng
| ^~~~~~~~~configfile.lex.c:1089:12: note: in expansion of macro 'yylex'
1089 |
| ^
...
Google the world and find a similar fix
https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html
--- .../0001-drop-yylex-to-static-force.patch | 51 +++++++++++++++++++ meta/recipes-extended/pam/libpam_1.3.1.bb | 1 + 2 files changed, 52 insertions(+) create mode 100644 meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 53f0fd76d6eb0ba5149d316647f83d3c56d1f9aa Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <[email protected]> +Date: Mon, 9 Dec 2019 18:31:06 -0800 +Subject: [PATCH] drop yylex to static force + +Since flex was upgraded to 2.6.4, there is a build failure +... +In file included from ../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56: +configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows non-static declaration + 23 | #define yyleng _pc_yyleng + | ^~~~~~~~~ +configfile.lex.c:1091:28: note: in expansion of macro 'yylex' + 1091 | + | ^ +configfile.lex.c:1111:1: note: in expansion of macro 'YY_DECL' + 1111 | */ + | ^~~ +configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here + 23 | #define yyleng _pc_yyleng + | ^~~~~~~~~ +configfile.lex.c:1089:12: note: in expansion of macro 'yylex' + 1089 | + | ^ +... + +Google the world and find a similar fix +https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <[email protected]> +--- + modules/pam_console/sed-static | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/pam_console/sed-static b/modules/pam_console/sed-static +index b9a6fa2..c7a850e 100644 +--- a/modules/pam_console/sed-static ++++ b/modules/pam_console/sed-static +@@ -13,7 +13,7 @@ sed ' + /^YY_BUFFER_STATE yy_scan_buffer/s/^/STATIC / + /^YY_BUFFER_STATE yy_scan_string/s/^/STATIC / + /^void yy_switch_to_buffer/s/^/STATIC / +-/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC / ++#/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC / + /^int yyparse/s/^/STATIC / + /^void yyrestart/s/^/STATIC / + ' < $1 > sedtmp.$$ && mv sedtmp.$$ $1 +-- +2.21.0 +
meta/recipes-extended/pam/libpam_1.3.1.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux file://pam-security-abstract-securetty-handling.patch \ file://pam-unix-nullok-secure.patch \ file://crypt_configure.patch \ + file://0001-drop-yylex-to-static-force.patch \ " SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"
Signature · 1 line
2.21.0
meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch line 39
Quoted 4 lines
meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch new file +4
-0+diff --git a/modules/pam_console/sed-static b/modules/pam_console/sed-static +index b9a6fa2..c7a850e 100644 +--- a/modules/pam_console/sed-static ++++ b/modules/pam_console/sed-static
do_patch fails with:
can't find file to patch at input line 40
I guess your WRL layers are patching pam-console in?
Ross
Quoted 8 lines · Ross Burton
Quoted 5 lines
+diff --git a/modules/pam_console/sed-static
b/modules/pam_console/sed-static
+index b9a6fa2..c7a850e 100644
+--- a/modules/pam_console/sed-static
++++ b/modules/pam_console/sed-static
do_patchfails with:
Quoted 4 lines
can't find file to patch at input line 40
I guess your WRL layers are patching pam-console in?
Yes, you are right, sorry for the nosiy
//Hongxu
Quoted 1 line
Ross