summaryrefslogtreecommitdiff
path: root/libc/misc/ttyent
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/ttyent')
-rw-r--r--libc/misc/ttyent/getttyent.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 8e104733c..9b83b6ede 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -29,6 +29,7 @@
#define __fsetlocking __fsetlocking_internal
#define rewind __rewind
+#define fgets_unlocked __fgets_unlocked
#define _GNU_SOURCE
#include <features.h>
@@ -42,6 +43,8 @@
#include <pthread.h>
#endif
+extern int __getc_unlocked (FILE *__stream) attribute_hidden;
+
static char zapchar;
static FILE *tf;
static struct ttyent tty;
@@ -130,7 +133,7 @@ struct ttyent attribute_hidden * __getttyent(void)
}
/* skip lines that are too big */
if (!__strchr(p, '\n')) {
- while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
+ while ((c = __getc_unlocked(tf)) != '\n' && c != EOF)
;
continue;
}