From ffaab09e998678ba2309821300ac10d62f3d3a78 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 23 Dec 2024 11:13:19 -0800 Subject: fix(build): is system-dependent #31705 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Since 2a7d0ed6145bf3f8b139c2694563f460f829813a, build fails with glibc version 2.28 / RHEL8 (where `termios.h` does not include unistd.h and is therefore missing `_POSIX_VDISABLE`): …/src/nvim/tui/termkey/termkey.c: In function 'termkey_start': …/src/nvim/tui/termkey/termkey.c:516:31: error: '_POSIX_VDISABLE' undeclared (first use in this function) 516 | termios.c_cc[VQUIT] = _POSIX_VDISABLE; | ^~~~~~~~~~~~~~~ …/src/nvim/tui/termkey/termkey.c:516:31: note: each undeclared identifier is reported only once for each function it appears in Solution: - Undo the `` change and mark the imports with `IWYU pragma: keep`. --- src/nvim/tui/termkey/termkey.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/tui/termkey/termkey.c b/src/nvim/tui/termkey/termkey.c index 8fdaa1d4f4..f5736e9b69 100644 --- a/src/nvim/tui/termkey/termkey.c +++ b/src/nvim/tui/termkey/termkey.c @@ -13,7 +13,10 @@ #include "nvim/tui/termkey/termkey_defs.h" #ifndef _WIN32 -# include +// Include these directly instead of which is system-dependent. #31704 +# include // IWYU pragma: keep +# include // IWYU pragma: keep +# include // IWYU pragma: keep #else # include #endif -- cgit