commit | 20788aec002ab3f6dea4e01665a439933161d11c | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Thu Jun 09 15:16:32 2016 -0700 |
committer | Elliott Hughes <enh@google.com> | Thu Jun 09 15:16:32 2016 -0700 |
tree | cb77d4d956f2377e762476a96cfe92b4dcaf6a94 | |
parent | 70d99a1053542b8c062e6cb7eca2bcfb16c25d55 [diff] [blame] |
Add ctermid. Change-Id: I7c7c815c2725df222932db923632c8b6419741ab
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index 5df1bb9..3aabbe2 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 @@ } return fp; } + +char* ctermid(char* s) { + return s ? strcpy(s, _PATH_TTY) : const_cast<char*>(_PATH_TTY); +}