The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b1bb3aa65cc9d720f54dba009565e0d1d0419323
commit b1bb3aa65cc9d720f54dba009565e0d1d0419323 Author: Ed Maste <[email protected]> AuthorDate: 2025-05-30 15:58:41 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-07-10 17:19:23 +0000 tests: Fix build if TIOCSTI is not defined Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI We already have some components (such as mail and tcsh) that build without TIOCSTI defined. This is (existing portability support in those projects. Simplify things for downstreams by extending this approach to this additional TIOCSTI user. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50614 (cherry picked from commit 52a2b4bc5da21d7a54cb16b9450196244b59b8c0) --- tests/sys/kern/tty/test_sti.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/sys/kern/tty/test_sti.c b/tests/sys/kern/tty/test_sti.c index f792001b4e3f..d6ce05f76d81 100644 --- a/tests/sys/kern/tty/test_sti.c +++ b/tests/sys/kern/tty/test_sti.c @@ -19,6 +19,7 @@ #include <atf-c.h> #include <libutil.h> +#if defined(TIOCSTI) enum stierr { STIERR_CONFIG_FETCH, STIERR_CONFIG, @@ -325,13 +326,18 @@ ATF_TC_BODY(unprivileged_fail_noread, tc) finalize_child(pid, -1); } +#endif /* defined(TIOCSTI) */ ATF_TP_ADD_TCS(tp) { +#if !defined(TIOCSTI) + (void)tp; +#else ATF_TP_ADD_TC(tp, basic); ATF_TP_ADD_TC(tp, root); ATF_TP_ADD_TC(tp, unprivileged_fail_noctty); ATF_TP_ADD_TC(tp, unprivileged_fail_noread); +#endif return (atf_no_error()); }
