X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Funistd%2Fttyname_r.c;h=82acb75e19d60a6a075e7398dc23d9b4f8729e5d;hb=3953aecbef11f3e8f5ae9388873dfaa554874309;hp=cb364c2913b442934304ac95d8fea48f01b80052;hpb=6fcd60ddd903df13402704fe6026cb1f8e780fd7;p=musl 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);