package/linux-pam: fix musl build

The bump to version 1.5.3 with buildroot commit
f8147e27cd added the file patched.

Please note that the next version will include
5fa961fd3b
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 <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls 2023-07-30 09:14:22 +02:00 committed by Thomas Petazzoni
parent eb99c88a15
commit a9523e3f72

View File

@ -0,0 +1,40 @@
From 5374f677e4cae669eb9accf2449178b602e8a40a Mon Sep 17 00:00:00 2001
From: Violet Purcell <vimproved@inventati.org>
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 <bernd@kuhls.net>
---
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 <string.h>
#include <errno.h>
#include <unistd.h>
-#include <termio.h>
+#include <termios.h>
#include <security/pam_appl.h>
+#include <sys/ioctl.h>
/***************************************
* @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));