update Fri Feb 12 12:37:00 PST 2010
[pkgsrc.git] / sysutils / toshutils / patches / patch-al
1 $NetBSD: patch-al,v 1.1.1.1 1999/12/20 03:05:16 hubertf Exp $
2
3 --- src/tuxtime-conf.c.orig     Fri Dec 17 14:07:03 1999
4 +++ src/tuxtime-conf.c  Mon Dec 20 03:33:35 1999
5 @@ -35,7 +35,12 @@
6  #include<signal.h>
7  #include<paths.h>
8  #include<pwd.h>
9 +#ifdef Linux
10  #include<features.h>
11 +#endif
12 +#ifdef __NetBSD__
13 +#include <err.h>
14 +#endif
15  #ifdef __GLIBC__
16  #include<sys/perm.h>
17  #endif
18 @@ -167,10 +172,17 @@
19  
20         /* get the necessary I/O permissions */
21  
22 +#ifdef __NetBSD__
23 +        if (i386_iopl(3) == -1) { 
24 +                warn("i386_iopl");
25 +                return 1;
26 +        }
27 +#else
28         if (ioperm(0xb2, 1, 1)) {
29                 fprintf(stderr, "tuxtime-conf: can't get I/O permissions.\n");
30                 return 1;
31         }
32 +#endif
33  
34         /* do a quick check on the laptop */
35