summaryrefslogtreecommitdiff
path: root/comms/hf/files/patch-hfkernel_elbug.c
blob: 2a900540aac363f79235e9a76b95032a1e5d0385 (plain) (blame)
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
--- hfkernel/cw/elbug.c.orig	2007-12-24 09:30:07.000000000 -0500
+++ hfkernel/cw/elbug.c	2007-12-24 09:31:45.000000000 -0500
@@ -37,7 +37,9 @@
 #include <machine/cpufunc.h>
 #include <machine/sysarch.h>
 #include <sys/kbio.h>
+#ifdef __i386__
 #define IOPERM i386_set_ioperm
+#endif
 #else
 #include <sys/kd.h>		/* Linux, UnixWare */
 #endif
@@ -328,10 +330,15 @@
 	exit (0);
 	}
     }
+#ifdef IOPERM
     if ((err = IOPERM(port, 8, 1))) {
 	printf("permission problem for serial port %04x: ioperm = %d\n", port, err);
 	printf("This program has to be called with root permissions.\n");
     }
+#else
+	printf("No IOPERM non i386?\n");
+	exit(-1);
+#endif
     if ((fd_ptt = open(name_ptt, O_RDWR, 0)) < 0) {
 	printf("error in opening ptt device %s - maybe try another one?\n", 
 	    name_ptt);