pkgsrc/comms/plp/patches/patch-ab

25 lines
621 B
Text

$NetBSD: patch-ab,v 1.5 2005/12/23 16:10:05 joerg Exp $
--- ncp/mp_serial.c.orig 1999-11-02 20:47:06.000000000 +0000
+++ ncp/mp_serial.c
@@ -37,9 +37,7 @@
#ifdef sun
# include <sys/ttold.h> /* sun has TIOCEXCL there */
#endif
-#if defined (__SVR4)
#include <stdlib.h>
-#endif
static struct termios sti;
@@ -223,8 +221,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) {