Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp	(revision 41356)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv-dtrace.cpp	(revision 41357)
@@ -68,6 +68,18 @@
 # define intptr_t dtrace_intptr_t
 # include "dtrace.h"
+# define FIX_UEK_RC(a_rc) (-(a_rc))
 #else
 # include <sys/dtrace.h>
+#endif
+
+
+/** 
+ * The UEK DTrace port is trying to be smart and seems to have turned all 
+ * errno return codes negative.  While this conforms to the linux kernel way of
+ * doing things, it breaks with the way the interfaces work on Solaris and 
+ * Mac OS X.
+ */
+#ifndef FIX_UEK_RC
+# define FIX_UEK_RC(a_rc) (a_rc) 
 #endif
 
@@ -925,5 +937,5 @@
     {
         pCore->TracerData.DTrace.idProvider = 0;
-        rc = RTErrConvertFromErrno(rc);
+        rc = RTErrConvertFromErrno(FIX_UEK_RC(rc));
     }
 
@@ -951,5 +963,5 @@
     else
     {
-        AssertMsg(rc == EBUSY, ("%d\n", rc));
+        AssertMsg(FIX_UEK_RC(rc) == EBUSY, ("%d\n", rc));
         pCore->TracerData.DTrace.fZombie = true;
         rc = VERR_TRY_AGAIN;
@@ -979,5 +991,5 @@
     else
     {
-        AssertMsg(rc == EBUSY, ("%d\n", rc));
+        AssertMsg(FIX_UEK_RC(rc) == EBUSY, ("%d\n", rc));
         rc = VERR_TRY_AGAIN;
     }
