From a9523e3f72bc05fc2ecfa9ebf597fde0e512ff95 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 30 Jul 2023 09:14:22 +0200 Subject: [PATCH] package/linux-pam: fix musl build The bump to version 1.5.3 with buildroot commit f8147e27cdac8f998ec6644a09ce4e8d62b6433c added the file patched. Please note that the next version will include https://github.com/linux-pam/linux-pam/commit/5fa961fd3b5b8cf5ba1a0cf49b10ebf79e273e96 which adds --enable-examples as configure option to disable examples. This patch, although it would also fix the problem, is not added instead to avoid autoreconf. Fixes: http://autobuild.buildroot.net/results/1d9/1d96d4c57969536c14340ae5542e62a9459246f9/ Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- ...-examples-tty_conv-fix-build-on-musl.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch diff --git a/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch b/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch new file mode 100644 index 0000000000..c1257d64da --- /dev/null +++ b/package/linux-pam/0001-examples-tty_conv-fix-build-on-musl.patch @@ -0,0 +1,40 @@ +From 5374f677e4cae669eb9accf2449178b602e8a40a Mon Sep 17 00:00:00 2001 +From: Violet Purcell +Date: Thu, 11 May 2023 12:50:34 -0400 +Subject: [PATCH] examples/tty_conv: fix build on musl + +termio.h is the old System V version of the interface header, and is +only provided in glibc and dietlibc as far as I can tell. +This fixes it to use the POSIX termios.h instead. + +Upstream: https://github.com/linux-pam/linux-pam/commit/5374f677e4cae669eb9accf2449178b602e8a40a + +Signed-off-by: Bernd Kuhls +--- + examples/tty_conv.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/examples/tty_conv.c b/examples/tty_conv.c +index 23f0684cc..9a0e1ad99 100644 +--- a/examples/tty_conv.c ++++ b/examples/tty_conv.c +@@ -6,8 +6,9 @@ + #include + #include + #include +-#include ++#include + #include ++#include + + /*************************************** + * @brief echo off/on +@@ -16,7 +17,7 @@ + ***************************************/ + static void echoOff(int fd, int off) + { +- struct termio tty; ++ struct termios tty; + if (ioctl(fd, TCGETA, &tty) < 0) + { + fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));