git: d583f3101bcf - stable/14 - tests: Fix build if TIOCSTI is not defined
Ed Maste <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a85d350.38147.55317259__44475.7486738794$1787155297$gmane$org@gitrepo.freebsd.org> |
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d583f3101bcf346655086a2d6bfd77137f05498e commit d583f3101bcf346655086a2d6bfd77137f05498e Author: Ed Maste <[email protected]> AuthorDate: 2025-05-30 15:58:41 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-08-19 16:01:08 +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) (cherry picked from commit b1bb3aa65cc9d720f54dba009565e0d1d0419323) --- 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()); }