From 9160d1211f7ff51d08a039239b744da684ae70c2 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Thu, 6 Feb 2025 19:11:50 +0100 Subject: fix(terminal): failing NetBSD compilation, missing symbols fixes #43 --- src/term.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/term.c b/src/term.c index 4deb5f1..3a30d2b 100644 --- a/src/term.c +++ b/src/term.c @@ -166,7 +166,7 @@ static const struct ls_RegConst nix_console_i_flags[] = { {"I_INLCR", CHECK_NIX_FLAG_OR_ZERO(INLCR)}, {"I_IGNCR", CHECK_NIX_FLAG_OR_ZERO(IGNCR)}, {"I_ICRNL", CHECK_NIX_FLAG_OR_ZERO(ICRNL)}, -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) {"I_IUCLC", CHECK_NIX_FLAG_OR_ZERO(IUCLC)}, // Might not be available on all systems #else {"I_IUCLC", 0}, @@ -181,7 +181,7 @@ static const struct ls_RegConst nix_console_i_flags[] = { static const struct ls_RegConst nix_console_o_flags[] = { // Output flags (c_oflag) {"O_OPOST", CHECK_NIX_FLAG_OR_ZERO(OPOST)}, -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) {"O_OLCUC", CHECK_NIX_FLAG_OR_ZERO(OLCUC)}, // Might not be available on all systems #else {"O_OLCUC", 0}, @@ -190,7 +190,7 @@ static const struct ls_RegConst nix_console_o_flags[] = { {"O_OCRNL", CHECK_NIX_FLAG_OR_ZERO(OCRNL)}, {"O_ONOCR", CHECK_NIX_FLAG_OR_ZERO(ONOCR)}, {"O_ONLRET", CHECK_NIX_FLAG_OR_ZERO(ONLRET)}, -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__NetBSD__) {"O_OFILL", CHECK_NIX_FLAG_OR_ZERO(OFILL)}, {"O_OFDEL", CHECK_NIX_FLAG_OR_ZERO(OFDEL)}, {"O_NLDLY", CHECK_NIX_FLAG_OR_ZERO(NLDLY)}, @@ -201,8 +201,12 @@ static const struct ls_RegConst nix_console_o_flags[] = { {"O_NLDLY", 0}, {"O_CRDLY", 0}, #endif +#if !defined(__NetBSD__) {"O_TABDLY", CHECK_NIX_FLAG_OR_ZERO(TABDLY)}, -#ifndef __FreeBSD__ +#else + {"O_TABDLY", 0}, +#endif +#if !defined(__FreeBSD__) && !defined(__NetBSD__) {"O_BSDLY", CHECK_NIX_FLAG_OR_ZERO(BSDLY)}, {"O_VTDLY", CHECK_NIX_FLAG_OR_ZERO(VTDLY)}, {"O_FFDLY", CHECK_NIX_FLAG_OR_ZERO(FFDLY)}, @@ -218,7 +222,7 @@ static const struct ls_RegConst nix_console_l_flags[] = { // Local flags (c_lflag) {"L_ISIG", CHECK_NIX_FLAG_OR_ZERO(ISIG)}, {"L_ICANON", CHECK_NIX_FLAG_OR_ZERO(ICANON)}, -#if !defined(__APPLE__) && !defined(__FreeBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) {"L_XCASE", CHECK_NIX_FLAG_OR_ZERO(XCASE)}, // Might not be available on all systems #else {"L_XCASE", 0}, -- cgit v1.2.3-55-g6feb