40 lines
946 B
Text
40 lines
946 B
Text
$NetBSD: patch-ae,v 1.2 2006/01/02 16:17:09 joerg Exp $
|
|
|
|
--- mdmdetect.c.orig 2001-02-11 00:02:58.000000000 +0000
|
|
+++ mdmdetect.c
|
|
@@ -37,18 +37,20 @@ static char rcsid[] = "$Id: mdmdetect.c,
|
|
#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 */
|
|
|
|
#define TIMEOUT_READ 5
|
|
|
|
-#ifndef __FreeBSD__
|
|
-#ifndef __GLIBC__
|
|
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__GLIBC__)
|
|
extern char *sys_errlist[];
|
|
#endif
|
|
-#endif
|
|
extern char *xtel_basename (), *next_token ();
|
|
|
|
static int fdl;
|
|
@@ -290,7 +292,11 @@ char **av;
|
|
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);
|
|
}
|