From 69122fb5541575f7f20e1dee855a5f9eab6f57a9 Mon Sep 17 00:00:00 2001 From: Moritz Kick Date: Wed, 29 Jun 2016 18:23:08 +0200 Subject: [PATCH] Make linux-build POSIX compatible Also allow it to actually compile on musl-libc systems. From glibc's termio.h: /* Compatible for old `struct termio' ioctl interface. This is obsolete; use the POSIX.1 `struct termios' interface defined in instead. */ --- include/common.h | 3 ++- src/shared.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index c63d15a..7f3cf27 100644 --- a/include/common.h +++ b/include/common.h @@ -41,7 +41,8 @@ #include #ifdef LINUX -#include +#include +#include #endif #ifdef DARWIN diff --git a/src/shared.c b/src/shared.c index 2cc6d9f..2eb6097 100644 --- a/src/shared.c +++ b/src/shared.c @@ -2334,12 +2334,12 @@ void drupal7_encode (u8 digest[64], u8 buf[43]) */ #ifdef LINUX -static struct termio savemodes; +static struct termios savemodes; static int havemodes = 0; int tty_break() { - struct termio modmodes; + struct termios modmodes; if (ioctl (fileno (stdin), TCGETA, &savemodes) < 0) return -1; -- 2.25.1