===================================================================
RCS file: sanei/sanei_usb.c,v
retrieving revision 1.1
diff -uBitwb -r1.1 sanei/sanei_usb.c
--- sanei/sanei_usb.c   2019/05/14 18:53:16     1.1
+++ sanei/sanei_usb.c   2019/05/14 18:54:35
@@ -2298,7 +2298,11 @@
         {
           write_size = usb_bulk_write (devices[dn].libusb_handle,
                                        devices[dn].bulk_out_ep,
+#ifdef _SYS_USB_LIBUSB_USB_H
+                                       (char *) buffer,
+#else
                                        (const char *) buffer,
+#endif
                                        (int) *size, libusb_timeout);
           if (write_size < 0)
             DBG (1, "sanei_usb_write_bulk: write failed: %s\n",

===================================================================
RCS file: sanei/sanei_auth.c,v
retrieving revision 1.1
diff -uBitwb -r1.1 sanei/sanei_auth.c
--- sanei/sanei_auth.c  2019/05/14 19:04:52     1.1
+++ sanei/sanei_auth.c  2019/05/14 19:24:09
@@ -227,8 +227,13 @@
       return SANE_STATUS_ACCESS_DENIED;
     }
 
+#if defined(__SVR4) || defined(__sun)
+  sprintf (md5resource, "%.128s$MD5$%x%lx%08lx",
+           resource, (unsigned int) getpid (), (long int) time (NULL), randombits ());
+#else
   sprintf (md5resource, "%.128s$MD5$%x%lx%08lx",
            resource, getpid (), (long int) time (NULL), randombits ());
+#endif
 
   DBG(0, "resource=%s\n", md5resource);
 

===================================================================
RCS file: sanei/sanei_scsi.c,v
retrieving revision 1.1
diff -uBitwb -r1.1 sanei/sanei_scsi.c
--- sanei/sanei_scsi.c  2019/05/14 19:27:54     1.1
+++ sanei/sanei_scsi.c  2019/05/15 20:07:33
@@ -436,8 +436,15 @@
 static u_char cdb_sizes[8] = {
   6, 10, 10, 12, 12, 12, 10, 10
 };
-#define CDB_SIZE(opcode)        cdb_sizes[(((opcode) >> 5) & 7)]
 
+/* ras solaris 10 u8 hack
+**   CDB_SIZE defined in sys/scsi/impl/commands.h annotated as deprecated
+** so we undefine it and rely on the sanei_scsi macro
+*/
+#if defined(CDB_SIZE)
+# undef CDB_SIZE
+#endif
+#define CDB_SIZE(opcode)        cdb_sizes[(((opcode) >> 5) & 7)]
 
 #if USE == DOMAINOS_INTERFACE
 
