Patch for a clean build on Solaris 

not suitable for upstream

--- src/mesa/drivers/dri/i965/brw_sync.c	2019-03-04 14:01:27.980943410 -0800
+++ src/mesa/drivers/dri/i965/brw_sync.c	2019-03-04 14:01:48.370898259 -0800
@@ -38,7 +38,9 @@
  * performance bottleneck, though.
  */
 
+#ifdef SYNC_IOC_MERGE
 #include <libsync.h> /* Requires Android or libdrm-2.4.72 */
+#endif
 
 #include "main/imports.h"
 
--- src/mesa/drivers/dri/i965/brw_sync.c      2019-05-16 08:45:58.414498243 -0700
+++ src/mesa/drivers/dri/i965/brw_sync.c     2019-05-16 08:44:44.903512588 -0700
@@ -222,8 +222,10 @@
    case BRW_FENCE_TYPE_SYNC_FD:
       assert(fence->sync_fd != -1);

+#ifdef SYNC_IOC_MERGE
       if (sync_wait(fence->sync_fd, 0) == -1)
          return false;
+#endif

       fence->signalled = true;

@@ -286,9 +288,12 @@
       else
          timeout_i32 = timeout;

+#ifdef SYNC_IOC_MERGE
       if (sync_wait(fence->sync_fd, timeout_i32) == -1)
          return false;

+#endif
+
       fence->signalled = true;
       return true;
    }