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, 2 insertions, 3 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index c9c68f1cc..e68eb8aa0 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
+#include <malloc.h>
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
#endif
@@ -132,9 +133,7 @@ struct ttyent * getttyent(void)
return (NULL);
if (!line) {
- line = malloc(BUFSIZ);
- if (!line)
- abort();
+ line = __uc_malloc(BUFSIZ);
}
__STDIO_ALWAYS_THREADLOCK(tf);