From 20788aec002ab3f6dea4e01665a439933161d11c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 9 Jun 2016 15:16:32 -0700 Subject: Add ctermid. Change-Id: I7c7c815c2725df222932db923632c8b6419741ab --- libc/stdio/stdio.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/stdio/stdio.cpp') diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index 5df1bb95d..3aabbe23c 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -598,3 +599,7 @@ FILE* funopen64(const void* cookie, } return fp; } + +char* ctermid(char* s) { + return s ? strcpy(s, _PATH_TTY) : const_cast(_PATH_TTY); +} -- cgit v1.2.3