  #  define likely(x)   __builtin_expect(!!(x), 1)
  #  define unlikely(x) __builtin_expect(!!(x), 0)
  #else
+diff -Naur Mesa-7.8.2/src/mesa/main/execmem.c Mesa-7.8.2-haiku/src/mesa/main/execmem.c
+--- Mesa-7.8.2/src/mesa/main/execmem.c	2010-04-27 21:41:21.011272192 +0000
++++ Mesa-7.8.2-haiku/src/mesa/main/execmem.c	2013-04-24 20:35:32.244056064 +0000
+@@ -36,7 +36,7 @@
+ 
+ 
+ 
+-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
++#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
+ 
+ /*
+  * Allocate a large block of memory which can hold code then dole it out

 hpux10-gcc \
 hpux10-static \
diff -Naur Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h Mesa-7.8.2-haiku/src/gallium/auxiliary/draw/draw_private.h
--- Mesa-7.8.2/src/gallium/auxiliary/draw/draw_private.h	2010-06-15 17:43:42.046661632 +0000
+++ Mesa-7.8.2-haiku/src/gallium/auxiliary/draw/draw_private.h	2013-02-17 22:26:13.037486592 +0000
@@ -70,7 +70,7 @@
 
    /* This will probably become float (*data)[4] soon:

 #  define GLAPIENTRY
 #endif /* WIN32 && !CYGWIN */
diff -Naur Mesa-7.8.2/Makefile Mesa-7.8.2-haiku/Makefile
--- Mesa-7.8.2/Makefile	2010-06-16 21:22:57.034865152 +0000
+++ Mesa-7.8.2-haiku/Makefile	2013-04-24 20:34:52.695468032 +0000
@@ -84,6 +84,7 @@
 freebsd-dri \
 freebsd-dri-amd64 \
