diff options
author | Elliott Hughes <enh@google.com> | 2016-06-09 15:16:32 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2016-06-09 15:16:32 -0700 |
commit | 20788aec002ab3f6dea4e01665a439933161d11c (patch) | |
tree | cb77d4d956f2377e762476a96cfe92b4dcaf6a94 /libc/stdio/stdio.cpp | |
parent | 70d99a1053542b8c062e6cb7eca2bcfb16c25d55 (diff) |
Add ctermid.
Change-Id: I7c7c815c2725df222932db923632c8b6419741ab
Diffstat (limited to 'libc/stdio/stdio.cpp')
-rw-r--r-- | libc/stdio/stdio.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <errno.h> #include <fcntl.h> #include <limits.h> +#include <paths.h> #include <stdlib.h> #include <string.h> #include <sys/param.h> @@ -598,3 +599,7 @@ FILE* funopen64(const void* cookie, } return fp; } + +char* ctermid(char* s) { + return s ? strcpy(s, _PATH_TTY) : const_cast<char*>(_PATH_TTY); +} |