diff -ur rio107.orig/app.cpp rio107/app.cpp --- rio107.orig/app.cpp 1999-06-11 19:26:46.000000000 +0300 +++ rio107/app.cpp 2007-12-25 16:34:39.000000000 +0200 @@ -43,7 +43,7 @@ #endif #define DELETEARRAY delete[] -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // FreeBSD g++ #include #include diff -ur rio107.orig/rio.cpp rio107/rio.cpp --- rio107.orig/rio.cpp 1999-06-11 19:26:46.000000000 +0300 +++ rio107/rio.cpp 2007-12-25 16:34:39.000000000 +0200 @@ -63,18 +63,36 @@ #elif defined(__linux__) // linux g++ #include - #if defined(__alpha) - #include + + // Changed per Debian bug 50938 + //#if defined(__alpha) + // #include + //#else + // #include + //#endif + + // Changes per Debian bug 50938 + #if !defined(__i386__) + #include #else - #include + #include #endif + + // Changed per bug Debian bug 88779 + #if !defined(__alpha__) + #if __GLIBC__ + #include + #else #include + #endif + #endif + #define OUTPORT(p,v) outb( v, p ) #define INPORT(p) inb( p ) #define CLOCK_SECOND CLOCKS_PER_SEC #define DELETEARRAY delete[] -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // FreeBSD g++ #include #include @@ -236,7 +254,7 @@ #endif // if FreeBSD - #if defined(__FreeBSD__) + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // request direct access to memory addresses if ( open("/dev/io", O_RDONLY) == -1 ) {