diff options
Diffstat (limited to 'src/unistd/ttyname_r.c')
-rw-r--r-- | src/unistd/ttyname_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c index cb364c29..82acb75e 100644 --- a/src/unistd/ttyname_r.c +++ b/src/unistd/ttyname_r.c @@ -9,7 +9,7 @@ int ttyname_r(int fd, char *name, size_t size) char procname[sizeof "/proc/self/fd/" + 3*sizeof(int) + 2]; ssize_t l; - if (!isatty(fd)) return ENOTTY; + if (!isatty(fd)) return errno; __procfdname(procname, fd); l = readlink(procname, name, size); |