From dad3023caaee636717ebe46f44d44f7d06d2adf1 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 24 Oct 2015 13:56:07 +0100 Subject: [PATCH] libc: add ctermid Yes this is a cheap implementation but it works as we have a proper /dev/tty now --- Library/libs/ctermid.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Library/libs/ctermid.c diff --git a/Library/libs/ctermid.c b/Library/libs/ctermid.c new file mode 100644 index 00000000..c30e355d --- /dev/null +++ b/Library/libs/ctermid.c @@ -0,0 +1,15 @@ +#include +#include + +/* We have a real /dev/tty so this is a valid answer and + to spec */ + +static char path[L_ctermid] = "/dev/tty"; + +char *ctermid(char *p) +{ + if (p) + return strcpy(p, path); + else + return path; +} -- 2.34.1