From ea29d3bce6ee0720e8a31e0c0d4641ad3923e9ce Mon Sep 17 00:00:00 2001 From: d_m Date: Wed, 20 Dec 2023 10:10:50 -0500 Subject: [PATCH] get console compiling on netbsd --- src/devices/console.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/devices/console.c b/src/devices/console.c index 434eb1a..eb9c069 100644 --- a/src/devices/console.c +++ b/src/devices/console.c @@ -1,6 +1,10 @@ #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#ifdef __NetBSD__ +#define _NETBSD_SOURCE +#endif + #include #include #include @@ -16,6 +20,7 @@ #ifdef __NetBSD__ #include +#include #include #endif @@ -225,7 +230,7 @@ host_raw_tty() /* corresponds to `stty raw -echo` */ term.c_cflag |= (CS8); term.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP); - term.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF | IUCLC | IXANY | IMAXBEL); + term.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF | IXANY | IMAXBEL); term.c_lflag &= ~(ICANON | ISIG | ECHO); term.c_oflag &= ~(OPOST); term.c_cc[VMIN] = 0;