$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 #include #include +#ifdef USE_TERMIOS +#include +#else #include +#endif #ifdef SVR4 #include #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); }