The ptsname_r test fails on Solaris 11 OpenIndiana and Solaris 11 OmniOS: ../../gltests/test-ptsname_r.c:167: assertion 'result == 0' failed FAIL test-ptsname_r (exit status: 262)
This patch fixes it, by removing the test on the major number of the device. This major number is (according to 'ls -l /dev/pts/'): - 24 on Solaris 10, - 221 on Solaris 11.3, - 195 on Solaris OpenIndiana, - 180 on Solaris OmniOS. 2020-12-31 Bruno Haible <br...@clisp.org> 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/lib/ptsname_r.c b/lib/ptsname_r.c index 0008b95..c2fc65f 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;