diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c index a38ba4f2b3ed628778d00f2b24c0faac4f88a5c2..33aa4ae1a73672f87307b1bd9aababf7508b8e98 100644 --- a/src/unistd/ttyname_r.c +++ b/src/unistd/ttyname_r.c @@ -23,7 +23,7 @@ int ttyname_r(int fd, char *name, size_t size) if (stat(name, &st1) || fstat(fd, &st2)) return errno; if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino) - return ENOENT; + return ENODEV; return 0; }