summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-07-02 13:02:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-07-10 11:36:34 +0100
commit4c59fc31bfeae76b1cf25944431465043b191782 (patch)
tree09bc30fb30f4d35b22670c1f2e65778427b705f9
parent3195bb74c4809ac9630557c8a5695be69728469d (diff)
downloadpoky-4c59fc31bfeae76b1cf25944431465043b191782.tar.gz
libpam: Fix examples build on musl
This came with latest libpam upgrade ../../Linux-PAM-1.5.3/examples/tty_conv.c:9:10: fatal error: 'termio.h' file not found ^~~~~~~~~~ 1 error generated. (From OE-Core rev: 00b5cbad49ccce7f2886b2e70b93e60e054f8f46) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch39
-rw-r--r--meta/recipes-extended/pam/libpam_1.5.3.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch b/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch
new file mode 100644
index 0000000000..95c437df4f
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch
@@ -0,0 +1,39 @@
1From 9b96fcfa5748934b8b6a4db4ee25a5e3165905c0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 1 Jul 2023 07:48:17 -0700
4Subject: [PATCH] examples: Replace use of termio.h with termios.h
5
6Fixes build with musl and makes it portable
7
8Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/5374f677e4cae669eb9accf2449178b602e8a40a]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 examples/tty_conv.c | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/examples/tty_conv.c b/examples/tty_conv.c
15index 23f0684..db22500 100644
16--- a/examples/tty_conv.c
17+++ b/examples/tty_conv.c
18@@ -6,7 +6,8 @@
19 #include <string.h>
20 #include <errno.h>
21 #include <unistd.h>
22-#include <termio.h>
23+#include <termios.h>
24+#include <sys/ioctl.h>
25 #include <security/pam_appl.h>
26
27 /***************************************
28@@ -16,7 +17,7 @@
29 ***************************************/
30 static void echoOff(int fd, int off)
31 {
32- struct termio tty;
33+ struct termios tty;
34 if (ioctl(fd, TCGETA, &tty) < 0)
35 {
36 fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));
37--
382.41.0
39
diff --git a/meta/recipes-extended/pam/libpam_1.5.3.bb b/meta/recipes-extended/pam/libpam_1.5.3.bb
index c8f1e16459..eafb5aae43 100644
--- a/meta/recipes-extended/pam/libpam_1.5.3.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.3.bb
@@ -21,6 +21,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/Linux-PAM-${PV}.tar.xz \
21 file://pam.d/common-session-noninteractive \ 21 file://pam.d/common-session-noninteractive \
22 file://pam.d/other \ 22 file://pam.d/other \
23 file://libpam-xtests.patch \ 23 file://libpam-xtests.patch \
24 file://0001-examples-Replace-use-of-termio.h-with-termios.h.patch \
24 file://run-ptest \ 25 file://run-ptest \
25 file://pam-volatiles.conf \ 26 file://pam-volatiles.conf \
26 " 27 "