summaryrefslogtreecommitdiff
path: root/comms/xtel/patches/patch-ae
blob: 2de56a70524a5ce21f718bb0ef3112c6833e44f2 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$NetBSD: patch-ae,v 1.1.1.1 2002/01/12 18:34:56 bouyer Exp $

--- mdmdetect.c.orig	Sat Jan 12 17:57:18 2002
+++ mdmdetect.c	Sat Jan 12 17:59:39 2002
@@ -37,7 +37,11 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#ifdef USE_TERMIOS
+#include <termios.h>
+#else
 #include <termio.h>
+#endif
 #ifdef SVR4
 #include <sys/mkdev.h>
 #endif /* SVR4 */
@@ -45,10 +49,12 @@
 #define TIMEOUT_READ		5
 
 #ifndef __FreeBSD__
+#ifndef __NetBSD__
 #ifndef __GLIBC__
 extern char *sys_errlist[];
 #endif
 #endif
+#endif
 extern char *xtel_basename (), *next_token ();
 
 static int fdl;
@@ -290,7 +296,11 @@
     check_and_lock (cp);
 
     sprintf (buf, "/dev/%s", cp);
+#ifdef __NetBSD
+    if ((fd = open (buf, O_RDWR)) < 0) {
+#else
     if ((fd = open (buf, O_RDWR|O_NDELAY)) < 0) {
+#endif
       perror (buf);
       exit (1);
     }