Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c	(revision 63207)
@@ -356,4 +356,5 @@
 }
 
+#ifndef VBOX
 static char **
 make_argv(char *s)
@@ -376,4 +377,5 @@
 	return (argv);
 }
+#endif /* !VBOX */
 
 static void
@@ -1254,4 +1256,6 @@
 	/* Reinstall signal handler. Seems MSVCRT is System V style. */
 	signal(signo, intr);
+#else
+	RT_NOREF(signo);
 #endif
 }
@@ -1715,13 +1719,13 @@
 	 * may been affected by any library options set by the second pass.
 	 */
-#ifndef VBOX
+# ifndef VBOX
 	for (optind = 1; optind < argc; optind++) {
 		while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) {
-#else
+# else
 	RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0);
 	while ((c = RTGetOpt(&GetState, &ValueUnion))) {
 		{
 			char *optarg = (char *)ValueUnion.psz;
-#endif
+# endif
 			switch (c) {
 			case 'c':
Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_module.c	(revision 63207)
@@ -830,4 +830,5 @@
 }
 
+#ifndef VBOX
 /*
  * Update our module cache by adding an entry for the specified module 'name'.
@@ -837,5 +838,4 @@
 dt_module_update(dtrace_hdl_t *dtp, const char *name)
 {
-#ifndef VBOX
 	char fname[MAXPATHLEN];
 	struct stat64 st;
@@ -929,8 +929,6 @@
 	dt_dprintf("opened %d-bit module %s (%s) [%d]\n",
 	    bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid);
-#else  /* VBOX */
-	RT_NOREF2(dtp, name);
-#endif /* VBOX */
-}
+}
+#endif /* !VBOX */
 
 /*
@@ -1013,15 +1011,15 @@
 	dt_module_t *dmp;
 
-	switch ((uintptr_t)object) {
-	case (uintptr_t)DTRACE_OBJ_EXEC:
+	switch ((intptr_t)object) {
+	case DTRACE_OBJ_INT_EXEC:
 		dmp = dtp->dt_exec;
 		break;
-	case (uintptr_t)DTRACE_OBJ_RTLD:
+	case DTRACE_OBJ_INT_RTLD:
 		dmp = dtp->dt_rtld;
 		break;
-	case (uintptr_t)DTRACE_OBJ_CDEFS:
+	case DTRACE_OBJ_INT_CDEFS:
 		dmp = dtp->dt_cdefs;
 		break;
-	case (uintptr_t)DTRACE_OBJ_DDEFS:
+	case DTRACE_OBJ_INT_DDEFS:
 		dmp = dtp->dt_ddefs;
 		break;
Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_open.c	(revision 63207)
@@ -796,8 +796,8 @@
 }
 
+#ifndef VBOX
 static const char *
 dt_get_sysinfo(int cmd, char *buf, size_t len)
 {
-#ifndef VBOX
 	ssize_t rv = sysinfo(cmd, buf, len);
 	char *p = buf;
@@ -808,10 +808,7 @@
 	while ((p = strchr(p, '.')) != NULL)
 		*p++ = '_';
-#else
-	RT_NOREF1(cmd);
-	snprintf(buf, len, "%s", "Unknown");
-#endif
 	return (buf);
 }
+#endif /* !VBOX */
 
 static dtrace_hdl_t *
Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_options.c	(revision 63207)
@@ -744,5 +744,5 @@
 		}
 
-		if (suffix[i].name == NULL && *end != '\0' || val < 0)
+		if ((suffix[i].name == NULL && *end != '\0') || val < 0)
 			return (dt_set_errno(dtp, EDT_BADOPTVAL));
 
Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_work.c	(revision 63207)
@@ -36,6 +36,6 @@
 #else  /* VBOX */
 # include <dt_impl.h>
-//# include <stddef.h>
-//# include <time.h>
+/*# include <stddef.h>
+# include <time.h> */
 # include <iprt/semaphore.h>
 #endif /* VBOX */
Index: /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
===================================================================
--- /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h	(revision 63206)
+++ /trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h	(revision 63207)
@@ -443,11 +443,19 @@
  */
 
-#define	DTRACE_OBJ_EXEC	 ((const char *)(intptr_t)0L)	/* primary executable file */
-#define	DTRACE_OBJ_RTLD	 ((const char *)(intptr_t)1L)	/* run-time link-editor */
-#define	DTRACE_OBJ_CDEFS ((const char *)(intptr_t)2L)	/* C include definitions */
-#define	DTRACE_OBJ_DDEFS ((const char *)(intptr_t)3L)	/* D program definitions */
-#define	DTRACE_OBJ_EVERY ((const char *)(intptr_t)-1L)	/* all known objects */
-#define	DTRACE_OBJ_KMODS ((const char *)(intptr_t)-2L)	/* all kernel objects */
-#define	DTRACE_OBJ_UMODS ((const char *)(intptr_t)-3L)	/* all user objects */
+#define	DTRACE_OBJ_INT_EXEC  (0L)	/* primary executable file */
+#define	DTRACE_OBJ_INT_RTLD  (1L)	/* run-time link-editor */
+#define	DTRACE_OBJ_INT_CDEFS (2L)	/* C include definitions */
+#define	DTRACE_OBJ_INT_DDEFS (3L)	/* D program definitions */
+#define	DTRACE_OBJ_INT_EVERY (-1L)	/* all known objects */
+#define	DTRACE_OBJ_INT_KMODS (-2L)	/* all kernel objects */
+#define	DTRACE_OBJ_INT_UMODS (-3L)	/* all user objects */
+
+#define	DTRACE_OBJ_EXEC	 ((const char *)(intptr_t)DTRACE_OBJ_INT_EXEC )	/* primary executable file */
+#define	DTRACE_OBJ_RTLD	 ((const char *)(intptr_t)DTRACE_OBJ_INT_RTLD )	/* run-time link-editor */
+#define	DTRACE_OBJ_CDEFS ((const char *)(intptr_t)DTRACE_OBJ_INT_CDEFS)	/* C include definitions */
+#define	DTRACE_OBJ_DDEFS ((const char *)(intptr_t)DTRACE_OBJ_INT_DDEFS)	/* D program definitions */
+#define	DTRACE_OBJ_EVERY ((const char *)(intptr_t)DTRACE_OBJ_INT_EVERY)	/* all known objects */
+#define	DTRACE_OBJ_KMODS ((const char *)(intptr_t)DTRACE_OBJ_INT_KMODS)	/* all kernel objects */
+#define	DTRACE_OBJ_UMODS ((const char *)(intptr_t)DTRACE_OBJ_INT_UMODS)	/* all user objects */
 
 typedef struct dtrace_objinfo {
