diff -ur vmmon-only/include/vcpuset.h vmmon-only-patched/include/vcpuset.h
--- vmmon-only/include/vcpuset.h	2008-03-04 16:42:20.000000000 -0500
+++ vmmon-only-patched/include/vcpuset.h	2008-04-14 18:25:24.000000000 -0400
@@ -71,7 +71,7 @@
 #define ffs(x) ffs_x86_64(x)
 
 #elif defined MODULE
-   #include "asm/bitops.h"
+   #include "linux/bitops.h"
 #else // assume user-level Posix
    #include <string.h>
 #endif
diff -ur vmmon-only/include/vm_basic_types.h vmmon-only-patched/include/vm_basic_types.h
--- vmmon-only/include/vm_basic_types.h	2008-03-04 16:42:20.000000000 -0500
+++ vmmon-only-patched/include/vm_basic_types.h	2008-04-14 18:24:57.000000000 -0400
@@ -154,6 +154,8 @@
 #   endif
 
 #   ifndef _STDINT_H
+#      include <linux/version.h>
+#      if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 #      ifdef VM_I386
 #         ifdef VM_X86_64
              typedef uint64    uintptr_t;
@@ -166,6 +168,7 @@
           typedef uint64    uintptr_t;
 #      endif
 #   endif
+#   endif
 #endif
 
 
@@ -259,6 +262,7 @@
 #define MAX_UINT64 (CONST64U(0xffffffffffffffff))
 
 
+#include <linux/types.h>
 typedef uintptr_t VA;
 typedef uintptr_t VPN;
 
diff -ur vmmon-only/linux/driver.c vmmon-only-patched/linux/driver.c
--- vmmon-only/linux/driver.c	2008-03-04 16:42:20.000000000 -0500
+++ vmmon-only-patched/linux/driver.c	2008-04-14 18:24:57.000000000 -0400
@@ -1655,12 +1655,17 @@
 	  current->fsuid == current->uid &&
           current->egid == current->gid &&
 	  current->fsgid == current->gid) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 7)
-	 current->mm->dumpable = 1;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 7)
 	 current->dumpable = 1;
-#endif
+# else
+	 current->mm->dumpable = 1;
+# endif  /* < 2.6.24 */
          retval = 0;
+
+#else    /* >= 2.6.24, due to set_dumpable () not being exported to non-GPL modules */
+         retval = -ENOSYS;
+#endif
       } else {
          retval = -EPERM;
       }
diff -ur vmmon-only/Makefile.kernel vmmon-only-patched/Makefile.kernel
--- vmmon-only/Makefile.kernel	2008-03-04 16:42:20.000000000 -0500
+++ vmmon-only-patched/Makefile.kernel	2008-04-14 18:24:57.000000000 -0400
@@ -6,7 +6,7 @@
 ####  VMware vmmon Makefile to be distributed externally
 ####
 
-vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
+vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
 	$(EXTRA_CFLAGS) -Iinclude2/asm/mach-default -DKBUILD_BASENAME=\"$(DRIVER)\" \
 	-Werror -S -o /dev/null -xc $(1) \
 	> /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
