--- a/src/access_io.c	2005-03-11 18:55:41.000000000 +0100
+++ b/src/access_io.c	2015-05-31 11:14:36.635234600 +0200
@@ -47,7 +47,7 @@
 #include "parport.h"
 #include "ppdev.h"
 
-#ifdef HAVE_LINUX
+#if defined(HAVE_LINUX) && defined(__GLIBC__)
 
 #ifdef HAVE_SYS_IO_H
 #include <sys/io.h>
@@ -62,7 +62,7 @@ struct iopbuf {
   unsigned char port_value;
 };
 
-#elif defined(HAVE_CYGWIN_9X)
+#elif defined(HAVE_LINUX) && !defined(__GLIBC__) || defined(HAVE_CYGWIN_9X)
 
 #include "io.h"
 
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -39,9 +39,13 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+#if defined(__x86_64__) || defined(__i386__)
+
 /* Define to 1 if you have the <sys/io.h> header file. */
 #undef HAVE_SYS_IO_H
 
+#endif
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
