From 3ea6fc6e6c5c00ff2170b47f734dd6470e4e4fb2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 1 Jan 2021 01:12:08 +0100 Subject: [PATCH] ptsname_r: Fix test failure on Solaris. * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of the device. --- ChangeLog | 6 ++++++ lib/ptsname_r.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bc807d0afb..9cb45d0d7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2020-12-31 Bruno Haible + ptsname_r: Fix test failure on Solaris. + * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of + the device. + +2020-12-31 Bruno Haible + posixtm tests: Disable part of the test on plaforms where it fails. * tests/test-posixtm.c (T): Disable two tests on Solaris. diff --git a/lib/ptsname_r.c b/lib/ptsname_r.c index 0008b95304..c2fc65f4bc 100644 --- a/lib/ptsname_r.c +++ b/lib/ptsname_r.c @@ -97,7 +97,7 @@ __ptsname_r (int fd, char *buf, size_t buflen) # if defined __sun /* Solaris */ if (fstat (fd, &st) < 0) return errno; - if (!(S_ISCHR (st.st_mode) && major (st.st_rdev) == 0)) + if (!S_ISCHR (st.st_mode)) { errno = ENOTTY; return errno; -- 2.11.4.GIT