summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-06-09 15:16:32 -0700
committerElliott Hughes <enh@google.com>2016-06-09 15:16:32 -0700
commit20788aec002ab3f6dea4e01665a439933161d11c (patch)
treecb77d4d956f2377e762476a96cfe92b4dcaf6a94 /libc/stdio/stdio.cpp
parent70d99a1053542b8c062e6cb7eca2bcfb16c25d55 (diff)
Add ctermid.
Change-Id: I7c7c815c2725df222932db923632c8b6419741ab
Diffstat (limited to 'libc/stdio/stdio.cpp')
-rw-r--r--libc/stdio/stdio.cpp5
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);
+}