1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$NetBSD: patch-ah,v 1.3 1998/12/14 02:17:11 tv Exp $
--- console/xterm.c.orig Sun Dec 13 08:49:50 1998
+++ console/xterm.c Sun Dec 13 08:50:33 1998
@@ -116,9 +116,9 @@
*slave = fds;
if (term != NULL)
- tcsetattr((*slave)->_fileno, TCSANOW, term);
+ tcsetattr(fileno(*slave), TCSANOW, term);
if (winsize != NULL)
- ioctl((*slave)->_fileno, TIOCSWINSZ, winsize);
+ ioctl(fileno(*slave), TIOCSWINSZ, winsize);
if (name != NULL)
strcpy(name, pts_name);
@@ -143,8 +143,8 @@
return FALSE;
if ((*pid=fork()) == 0) {
- tcsetattr((*slave)->_fileno, TCSADRAIN, &term);
- sprintf(buf, "-Sxx%d", (*master)->_fileno);
+ tcsetattr(fileno(*slave), TCSADRAIN, &term);
+ sprintf(buf, "-Sxx%d", fileno(*master));
execlp("xterm", "xterm", buf, NULL);
ERR(console, "error creating AllocConsole xterm\n");
exit(1);
@@ -168,7 +168,7 @@
}
}
term.c_lflag |= ECHO;
- tcsetattr((*master)->_fileno, TCSADRAIN, &term);
+ tcsetattr(fileno(*master), TCSADRAIN, &term);
return TRUE;
}
|