about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ptsname.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-11-26 08:47:56 -0800
committerUlrich Drepper <drepper@redhat.com>2009-11-26 08:47:56 -0800
commite2c59de609151c643be697fd243ffe0b92753f43 (patch)
tree03e8d2577e25b00da8b39bf5a5b95011f0374273 /sysdeps/unix/sysv/linux/ptsname.c
parentc53f6228f178f54d8a93569b88c1c3144c8a9d3a (diff)
downloadglibc-e2c59de609151c643be697fd243ffe0b92753f43.tar.gz
glibc-e2c59de609151c643be697fd243ffe0b92753f43.tar.xz
glibc-e2c59de609151c643be697fd243ffe0b92753f43.zip
Avoid handling long-obsolete old BSD PTY handling in ptsname.
Support for this type of PTY was removed in the 2.1.115 kernel.  Just
use __LINUX_KERNEL_VERSION to determine when we can drop the compat code.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ptsname.c')
-rw-r--r--sysdeps/unix/sysv/linux/ptsname.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c
index ba7c791c9f..129d09085e 100644
--- a/sysdeps/unix/sysv/linux/ptsname.c
+++ b/sysdeps/unix/sysv/linux/ptsname.c
@@ -128,10 +128,12 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
 	}
 
       ptyno = minor (stp->st_rdev);
+#if __LINUX_KERNEL_VERSION >= 131443
       /* This is for the old BSD pseudo terminals.  As of Linux
 	 2.1.115 these are no longer supported.  */
       if (major (stp->st_rdev) == 4)
 	ptyno -= 128;
+#endif
 
       if (ptyno / 16 >= strlen (__libc_ptyname1))
 	{