[sane-devel] [PATCH] Port to OS X

Yurii Kolesnykov yurikoles at gmail.com
Wed Oct 7 16:44:49 UTC 2015


Signed-off-by: Yurii Kolesnykov <yurikoles at gmail.com>
---
 backend/epsonds-io.c         |  4 ++++
 include/sane/sanei_backend.h | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/backend/epsonds-io.c b/backend/epsonds-io.c
index 28bacfc..c0bdc28 100644
--- a/backend/epsonds-io.c
+++ b/backend/epsonds-io.c
@@ -20,6 +20,10 @@
 #include "epsonds.h"
 #include "epsonds-io.h"
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 size_t eds_send(epsonds_scanner *s, void *buf, size_t length, SANE_Status *status)
 {
 	DBG(32, "%s: size = %lu\n", __func__, (u_long) length);
diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h
index 1b5afe2..cf37cb3 100644
--- a/include/sane/sanei_backend.h
+++ b/include/sane/sanei_backend.h
@@ -68,8 +68,13 @@
 
 /* Just enough backwards compatibility that we get by in the backends
    without making handstands.  */
+
+# define sigset_t               int
+# endif
 # ifdef sigset_t
-#  undef sigset_t
+#  ifndef __APPLE__
+#   undef sigset_t
+#  endif
 # endif
 # ifdef sigemptyset
 #  undef sigemptyset
@@ -96,7 +101,10 @@
 #  undef SIG_SETMASK
 # endif
 
+# ifndef __APPLE__
 # define sigset_t               int
+# endif
+
 # define sigemptyset(set)       do { *(set) = 0; } while (0)
 # define sigfillset(set)        do { *(set) = ~0; } while (0)
 # define sigaddset(set,signal)  do { *(set) |= sigmask (signal); } while (0)
-- 
2.6.1




More information about the sane-devel mailing list