summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/ttyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/ttyname.c')
-rw-r--r--sysdeps/unix/sysv/linux/ttyname.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 3dacd40c23..e804ab323c 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -108,8 +108,10 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
}
+#ifndef __ASSUME_PROC_SELF_FD_NOT_SYMLINK
/* Static buffer in `ttyname'. */
libc_freeres_ptr (static char *ttyname_buf);
+#endif
/* Return the pathname of the terminal FD is open on, or NULL on errors.
@@ -167,6 +169,7 @@ ttyname (int fd)
len - UNREACHABLE_LEN);
len -= UNREACHABLE_LEN;
}
+#endif /* __ASSUME_PROC_SELF_FD_NOT_SYMLINK */
/* readlink need not terminate the string. */
ttyname_buf[len] = '\0';