aboutsummaryrefslogtreecommitdiff
path: root/games/bsdgames/files/patch-trek_main.c
blob: c6880a8a58932182b0d5a84c28dc6fab8e9cf44e (plain) (blame)
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
Index: trek/main.c
@@ -47,10 +47,12 @@
 
 # include	"trek.h"
 # include	<stdio.h>
-# include	<sgtty.h>
+# include 	<termios.h>
 # include	<setjmp.h>
 # include       <stdlib.h>
 
+# define gtty(_a,_b) tcgetattr(_a,_b)
+
 # define	PRIO		00	/* default priority */
 
 int	Mother	= 51 + (51 << 8);
@@ -163,7 +165,7 @@
 	int			prio;
 	int		ac;
 	char		**av;
-	struct	sgttyb		argp;
+	struct	termios		argp;
 
 	/* revoke */
 	setgid(getgid());
@@ -176,7 +178,7 @@
 	prio = PRIO;
 	if (gtty(1, &argp) == 0)
 	{
-		if ((argp.sg_ispeed ) < B1200)
+		if ((cfgetispeed(&argp)) < B1200)
 			Etc.fast++;
 	}
 	while (ac > 1 && av[0][0] == '-')