Also allow it to actually compile on musl-libc systems.
From glibc's termio.h:
/* Compatible <termio.h> for old `struct termio' ioctl interface.
This is obsolete; use the POSIX.1 `struct termios' interface
defined in <termios.h> instead. */
#include <limits.h>
#ifdef LINUX
#include <limits.h>
#ifdef LINUX
+#include <termios.h>
+#include <sys/ioctl.h>
-static struct termio savemodes;
+static struct termios savemodes;
static int havemodes = 0;
int tty_break()
{
static int havemodes = 0;
int tty_break()
{
- struct termio modmodes;
+ struct termios modmodes;
if (ioctl (fileno (stdin), TCGETA, &savemodes) < 0) return -1;
if (ioctl (fileno (stdin), TCGETA, &savemodes) < 0) return -1;