From a31025bb480e0abe09a10f4cd2b8b3b0baf7c81a Mon Sep 17 00:00:00 2001 From: Nysal Jan Date: Tue, 8 Feb 2011 02:54:47 +0000 Subject: [PATCH] Fix pty setup code on AIX This commit was SVN r24363. --- opal/util/opal_pty.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opal/util/opal_pty.c b/opal/util/opal_pty.c index 0d2e6f3816..3a92d196bc 100644 --- a/opal/util/opal_pty.c +++ b/opal/util/opal_pty.c @@ -171,7 +171,11 @@ static int ptym_open(char *pts_name) #ifdef HAVE_PTSNAME char *ptr; +#ifdef _AIX + strcpy(pts_name, "/dev/ptc"); +#else strcpy(pts_name, "/dev/ptmx"); +#endif fdm = open(pts_name, O_RDWR); if (fdm < 0) { return -1; @@ -228,6 +232,7 @@ static int ptys_open(int fdm, char *pts_name) close(fdm); return -5; } +#ifdef __sun if (ioctl(fds, I_PUSH, "ptem") < 0) { close(fdm); close(fds); @@ -238,6 +243,7 @@ static int ptys_open(int fdm, char *pts_name) close(fds); return -7; } +#endif return fds; #else