diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/ttyname.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/ttyname.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c index 40b006a8cd..35eb4b4696 100644 --- a/sysdeps/unix/sysv/linux/ttyname.c +++ b/sysdeps/unix/sysv/linux/ttyname.c @@ -131,7 +131,9 @@ ttyname (fd) } } - if (__readlink (procname, buf, buflen) != -1) + if (__readlink (procname, buf, buflen) != -1 + /* This is for Linux 2.0. */ + && buf[0] != '[') return buf; if (fstat (fd, &st) < 0) |