blob: 90f89152a5ccfe086ad9d32d9bfcab21d899b9c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ab,v 1.4 2004/09/08 12:47:39 wiz Exp $
--- ncp/mp_serial.c.orig 1999-11-02 21:47:06.000000000 +0100
+++ ncp/mp_serial.c
@@ -37,7 +37,7 @@
#ifdef sun
# include <sys/ttold.h> /* sun has TIOCEXCL there */
#endif
-#if defined (__SVR4)
+#if defined (__SVR4) || defined(__NetBSD__)
#include <stdlib.h>
#endif
@@ -223,8 +223,8 @@ int init_serial(const char *dev, int spe
void ser_exit(int fd)
{
struct termios ti;
- if(ioctl(fd, TCGETS, (caddr_t)&ti) < 0) {
- perror("TCGETSW");
+ if(tcgetattr(fd, &ti) < 0) {
+ perror("TIOCGETA");
}
ti.c_cflag &= ~CRTSCTS;
if(tcsetattr(fd, TCSANOW, &ti) < 0) {
|