--- sanei/sanei_pio.c.orig	2016-08-19 11:14:06.000000000 +0200
+++ sanei/sanei_pio.c	2017-11-12 20:06:53.428389561 +0100
@@ -61,6 +61,7 @@
 #define STUBS
 #include "sane/sanei_debug.h"
 #include <fcntl.h>
+#include <sys/types.h>
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
