On linux it seems that _XTyname() only takes one argument, no buffer required.
This commit is contained in:
@@ -72,7 +72,11 @@ GetPty(char **ptySlave, char **ptyMaster)
|
|||||||
|
|
||||||
if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
|
if ((ptyFd = open(*ptyMaster, O_RDWR, 0))) {
|
||||||
_Xttynameparams tty_buf;
|
_Xttynameparams tty_buf;
|
||||||
|
#if defined(linux)
|
||||||
|
if (c = _XTtyname(ptyFd)) {
|
||||||
|
#else
|
||||||
if (c = _XTtyname(ptyFd, tty_buf)) {
|
if (c = _XTtyname(ptyFd, tty_buf)) {
|
||||||
|
#endif
|
||||||
*ptySlave = malloc(strlen(c) + 1);
|
*ptySlave = malloc(strlen(c) + 1);
|
||||||
(void) strcpy(*ptySlave, c);
|
(void) strcpy(*ptySlave, c);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user