diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index 1fb1960546d..ac3e1381dd8 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -57,7 +57,7 @@ getttynam(tty) { register struct ttyent *t; - if (strnchr(tty, "/dev/", 5) == 0) + if (strncmp(tty, "/dev/", 5) == 0) tty += 5; setttyent(); while ( (t = getttyent()) )