summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViolet Purcell <vimproved@inventati.org>2023-05-11 13:02:43 -0400
committerSam James <sam@gentoo.org>2023-05-11 20:50:52 +0100
commit698929c9089de3995cd31c0a3a22866f3e5b7cba (patch)
treeb431111f4756ea74aff69af13eb6aac748252637 /sys-libs/pam
parentsys-kernel/gentoo-kernel-bin: Bump to 5.4.242-r2 (diff)
downloadgentoo-698929c9089de3995cd31c0a3a22866f3e5b7cba.tar.gz
gentoo-698929c9089de3995cd31c0a3a22866f3e5b7cba.tar.bz2
gentoo-698929c9089de3995cd31c0a3a22866f3e5b7cba.zip
sys-libs/pam: fix build on musl
[sam: Note that the examples aren't installed anyway.] Closes: https://bugs.gentoo.org/906137 Signed-off-by: Violet Purcell <vimproved@inventati.org> Closes: https://github.com/gentoo/gentoo/pull/31000 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/pam')
-rw-r--r--sys-libs/pam/files/pam-1.5.3-termios.patch34
-rw-r--r--sys-libs/pam/pam-1.5.3.ebuild4
2 files changed, 38 insertions, 0 deletions
diff --git a/sys-libs/pam/files/pam-1.5.3-termios.patch b/sys-libs/pam/files/pam-1.5.3-termios.patch
new file mode 100644
index 000000000000..8f7baf76fee4
--- /dev/null
+++ b/sys-libs/pam/files/pam-1.5.3-termios.patch
@@ -0,0 +1,34 @@
+Replace System V termio.h with POSIX termios.h for musl
+Upstream: https://github.com/linux-pam/linux-pam/pull/576
+Bug: https://bugs.gentoo.org/906137
+
+From 5658105b04ad4df212baf302898ee2cca99516a6 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Thu, 11 May 2023 10:27:53 -0400
+Subject: [PATCH] fix build on musl
+
+--- 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));
+--
+2.40.1
+
diff --git a/sys-libs/pam/pam-1.5.3.ebuild b/sys-libs/pam/pam-1.5.3.ebuild
index 6ac576c5eb0b..3f5a98a6d7df 100644
--- a/sys-libs/pam/pam-1.5.3.ebuild
+++ b/sys-libs/pam/pam-1.5.3.ebuild
@@ -45,6 +45,10 @@ DEPEND="
RDEPEND="${DEPEND}"
PDEPEND=">=sys-auth/pambase-20200616"
+PATCHES=(
+ "${FILESDIR}/${P}-termios.patch"
+)
+
src_prepare() {
default
touch ChangeLog || die