On linux it seems that _XTyname() only takes one argument, no buffer required.

This commit is contained in:
Peter Howkins 2012-03-11 19:12:51 +00:00
parent b89d6294c6
commit 42b737ba2a
1 changed files with 4 additions and 0 deletions

View File

@ -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);