From: Peter Howkins Date: Sun, 11 Mar 2012 19:12:51 +0000 (+0000) Subject: On linux it seems that _XTyname() only takes one argument, no buffer required. X-Git-Tag: 2.2.0a~26^2~142 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=42b737ba2a141a2f8a350031fd92e79ab93f9bd3;p=oweals%2Fcde.git On linux it seems that _XTyname() only takes one argument, no buffer required. --- 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);