[OE-core] [PATCH] libpam: drop yylex to static force

Hongxu Jia hongxu.jia at windriver.com
Tue Dec 10 03:08:33 UTC 2019


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

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
 .../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

diff --git a/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
new file mode 100644
index 0000000000..1aefa8c761
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
@@ -0,0 +1,51 @@
+From 53f0fd76d6eb0ba5149d316647f83d3c56d1f9aa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia at windriver.com>
+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 <hongxu.jia at windriver.com>
+---
+ 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
+
diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb
index 1194933827..440d77babc 100644
--- a/meta/recipes-extended/pam/libpam_1.3.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.3.1.bb
@@ -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"
-- 
2.21.0



More information about the Openembedded-core mailing list