diff --git a/libs/webcam/port.h.orig b/libs/webcam/port.h
index ab02785..f6bc572 100644
--- a/libs/webcam/port.h.orig
+++ b/libs/webcam/port.h
@@ -34,11 +34,17 @@
 //#include "config.h"
 
 #include <unistd.h>
+#if defined(arm) || defined(__hppa__) || defined(__sparc__) || \
+  defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || \
+  defined(__s390x__) || defined(__mips__) || defined(__mc68000__) || \
+  defined(__sh__)
+#define NO_SYS_IO_H 1
+#endif
 
 #ifdef __linux__
-  #if !defined(arm) && !defined(__hppa__) && !defined(__sparc__) && !defined(__ppc__) && !defined(__powerpc__) && !defined(__s390__) && !defined(__s390x__) && !defined(__mips__) && !defined(__mc68000__)
+  #ifndef NO_SYS_IO_H
   #include <sys/io.h>
-  #endif /* !arm */
+  #endif /* NO_SYS_IO_H */
 #elif defined(QNX)
 #include <conio.h>
 #elif defined(__FreeBSD__)
@@ -56,7 +62,7 @@
 #error Please define a platform in the Makefile
 #endif
 
-#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
+#ifdef NO_SYS_IO_H
 static char ports_temp;
 
 #ifdef inb
@@ -75,7 +81,7 @@ static char ports_temp;
   ports_temp = data; \
   write(devport, &ports_temp, 1);
 
-#endif /* arm, hppa */
+#endif /* NO_SYS_IO_H */
 
 class port_t {
 public:
@@ -115,7 +121,7 @@ private:
 #ifdef FREEBSD
   FILE *devio;
 #endif
-#if defined(__linux__) && (defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__))
+#if defined(__linux__) && defined(NO_SYS_IO_H)
   int devport;
 #endif
 };
