summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/unix/sysv/linux/ptsname.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 000a535f1d..1b487ec264 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-26 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): Avoid code
+ only used on truly ancient kernel if configuration requires a more
+ recent kernel.
+
2009-11-24 Ulrich Drepper <drepper@redhat.com>
[BZ #3662]
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))
{