Description: sys/io.h does not exist on all systems Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609152 Author: Scott Howard Index: rxtx/configure.in =================================================================== --- rxtx.orig/configure.in 2011-02-23 23:01:09.596613286 -0500 +++ rxtx/configure.in 2011-02-23 23:02:41.269525630 -0500 @@ -71,6 +71,7 @@ AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/signal.h) AC_CHECK_HEADERS(signal.h) +AC_CHECK_HEADERS(sys/io.h) AC_CHECK_HEADERS(termios.h) AC_CHECK_HEADERS(grp.h) AC_CHECK_HEADERS(pwd.h) Index: rxtx/src/RawImp.c =================================================================== --- rxtx.orig/src/RawImp.c 2011-02-23 23:04:29.641932242 -0500 +++ rxtx/src/RawImp.c 2011-02-23 23:05:40.487353587 -0500 @@ -99,11 +99,17 @@ # include # include #endif -#ifndef __APPLE__ /* dima */ -#ifndef PPC -#include -#endif /* PPC */ -#endif /* dima */ +#ifdef HAVE_SYS_IO_H +# include +#else +/* stubs for sys/io.h inl, inw, outb ...*/ +static __inline unsigned char inb (unsigned short int __port) { return 0; } +static __inline unsigned short int inw (unsigned short int __port) { return 0; } +static __inline unsigned int inl (unsigned short int __port) { return 0; } +static __inline void outb (unsigned char __value, unsigned short int __port) {} +static __inline void outl (unsigned int __value, unsigned short int __port) {} +static int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on) {return 0; } +#endif extern int errno; #include "I2CImp.h" --- rxtx/configure 2019-06-01 19:35:32.980610154 +0000 +++ rxtx/configure 2019-06-01 19:36:46.060942703 +0000 @@ -21150,6 +21150,17 @@ done +for ac_header in sys/io.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/io.h" "ac_cv_header_sys_io_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_io_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_IO_H 1 +_ACEOF + +fi + +done for ac_header in termios.h do