diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-06-05 02:09:04 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-06-05 02:09:04 +0400 |
commit | 415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da (patch) | |
tree | f7773ad82023c8616b339d84faa4bb7643af0311 /sysdeps/unix/sysv/linux/ttyname_r.c | |
parent | 3cc0cd4c5b3bed6f7d9aff26322d505785e11aa9 (diff) | |
download | glibc-415ee7d6e47dcb3e0906a7bebc6d52ab8ed899da.tar.gz |
Merged changes from kopensolaris-gnu project
http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu/glibc.git
Commits from 9157319 to bad8ac8.
This is only partial patch, some changes to not apply
and will be resovled and committed next.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ttyname_r.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/ttyname_r.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c index 2dd6781348..259d727a54 100644 --- a/sysdeps/unix/sysv/linux/ttyname_r.c +++ b/sysdeps/unix/sysv/linux/ttyname_r.c @@ -96,10 +96,13 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino, int __ttyname_r (int fd, char *buf, size_t buflen) { +#ifndef __ASSUME_PROC_SELF_FD_NOT_SYMLINK char procname[30]; +#endif struct stat64 st, st1; int dostat = 0; int save = errno; + ssize_t ret; /* Test for the absolute minimal size. This makes life easier inside the loop. */ @@ -149,6 +152,7 @@ __ttyname_r (int fd, char *buf, size_t buflen) memmove (buf, buf + UNREACHABLE_LEN, ret - UNREACHABLE_LEN); ret -= UNREACHABLE_LEN; } +#endif /* __ASSUME_PROC_SELF_FD_NOT_SYMLINK */ /* readlink need not terminate the string. */ buf[ret] = '\0'; |