summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViolet Purcell <vimproved@inventati.org>2023-05-11 12:50:34 -0400
committerDmitry V. Levin <ldv@strace.io>2023-05-12 02:09:07 +0000
commit5374f677e4cae669eb9accf2449178b602e8a40a (patch)
tree04a432bb67a1d6de92e53fccfc5d401c85869ad6
parentc46bc41487d48759e9bf22e30142e1c1a9f9de11 (diff)
downloadlinux-pam-git-5374f677e4cae669eb9accf2449178b602e8a40a.tar.gz
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.
-rw-r--r--examples/tty_conv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/tty_conv.c b/examples/tty_conv.c
index 23f0684c..9a0e1ad9 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));