From 42b737ba2a141a2f8a350031fd92e79ab93f9bd3 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Sun, 11 Mar 2012 19:12:51 +0000 Subject: [PATCH] On linux it seems that _XTyname() only takes one argument, no buffer required. --- cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c index cbdc2e79..238d51f7 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c @@ -72,7 +72,11 @@ GetPty(char **ptySlave, char **ptyMaster) if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) { _Xttynameparams tty_buf; +#if defined(linux) + if (c = _XTtyname(ptyFd)) { +#else if (c = _XTtyname(ptyFd, tty_buf)) { +#endif *ptySlave = malloc(strlen(c) + 1); (void) strcpy(*ptySlave, c); -- 2.25.1