[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#414302: cbmlink: FTBFS on GNU/kFreeBSD



Package: cbmlink
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> gcc -DCOMM_SERIAL -DCOMM_PC  -DUSE_PPDEV -Iext -Iop -Icomm -Wall -O3 -c comm/pcpar.c -o comm/pcpar.o
> comm/pcpar.c: In function 'open_port':
> comm/pcpar.c:152: warning: implicit declaration of function 'open'
> comm/pcpar.c:152: error: 'O_RDWR' undeclared (first use in this function)
> comm/pcpar.c:152: error: (Each undeclared identifier is reported only once
> comm/pcpar.c:152: error: for each function it appears in.)
> comm/pcpar.c: In function 'close_port':
> comm/pcpar.c:183: warning: implicit declaration of function 'close'
> comm/pcpar.c: In function 'write_data':
> comm/pcpar.c:195: warning: implicit declaration of function 'outbyte'
> comm/pcpar.c: In function 'read_stat':
> comm/pcpar.c:247: warning: implicit declaration of function 'inb'
> make[1]: *** [comm/pcpar.o] Error 1
> make[1]: Leaving directory `/build/buildd/cbmlink-0.9.6/src'
> make: *** [build-arch-stamp] Error 2


Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=cbmlink>.

Please find attached a tiny patch to fix this.

Cheers,

-- 
Cyril Brulebois
--- cbmlink-0.9.6/src/comm/pcpar.c	2007-03-10 20:04:54.213550000 +0100
+++ cbmlink-0.9.6/src/comm/pcpar.c	2007-03-10 20:16:31.000000000 +0100
@@ -81,7 +81,7 @@
 #ifdef USE_PPDEV
 /** the parallel port file descriptor */
 static int parfd = -1;
-# if defined __linux__ || defined __FreeBSD__
+# if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__
 #  include <unistd.h>
 #  include <sys/ioctl.h>
 #  include <fcntl.h>
@@ -128,7 +128,7 @@
 # ifdef USE_PPDEV
   if (baseaddr != (unsigned) -1) {
 # endif /* USE_PPDEV */
-# ifdef __linux__
+# if defined(__linux__) || defined(__FreeBSD_kernel__)
     if (ioperm (baseaddr, 3, 1)) {
       perror ("open_port: ioperm");
       return 0;
--- cbmlink-0.9.6/src/comm/pcpar.h	2007-03-10 20:15:49.725655000 +0100
+++ cbmlink-0.9.6/src/comm/pcpar.h	2007-03-10 20:16:51.000000000 +0100
@@ -23,7 +23,7 @@
  */
 
 #ifdef COMM_PC
-# ifdef __linux__
+# if defined(__linux__) || defined(__FreeBSD_kernel__)
 #  include <unistd.h>
 #  include <sys/io.h>
 #  define outbyte(value, port) outb (value, port)

Reply to: