summaryrefslogtreecommitdiff
path: root/ext/pty/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pty/pty.c')
-rw-r--r--ext/pty/pty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 8184b90185..0d3ba7f060 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -365,14 +365,18 @@ getDevice(master,slave)
if(unlockpt(i) != -1) {
if((pn = ptsname(i)) != NULL) {
if((j = open(pn, O_RDWR, 0)) != -1) {
+#if defined I_PUSH
if(ioctl(j, I_PUSH, "ptem") != -1) {
if(ioctl(j, I_PUSH, "ldterm") != -1) {
+#endif
*master = i;
*slave = j;
strcpy(SlaveName, pn);
return;
+#if defined I_PUSH
}
}
+#endif
}
}
}