From: Bruno Haible Date: Fri, 1 Jan 2021 00:12:08 +0000 (+0100) Subject: ptsname_r: Fix test failure on Solaris. X-Git-Tag: v1.0~3254 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3ea6fc6e6c5c00ff2170b47f734dd6470e4e4fb2;p=gnulib.git ptsname_r: Fix test failure on Solaris. * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of the device. --- diff --git a/ChangeLog b/ChangeLog index bc807d0afb..9cb45d0d7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. 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;