diff -ur vmmon-only/Makefile.kernel vmmon-only-patched/Makefile.kernel --- vmmon-only/Makefile.kernel 2007-09-06 23:59:54.000000000 +0200 +++ vmmon-only-patched/Makefile.kernel 2008-01-26 20:50:56.090051366 +0100 @@ -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) diff -ur vmmon-only/include/vm_basic_types.h vmmon-only-patched/include/vm_basic_types.h --- vmmon-only/include/vm_basic_types.h 2007-09-06 23:59:54.000000000 +0200 +++ vmmon-only-patched/include/vm_basic_types.h 2008-01-26 20:50:56.036792633 +0100 @@ -154,6 +154,8 @@ # endif # ifndef _STDINT_H +# include +# 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 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 2007-09-06 23:59:54.000000000 +0200 +++ vmmon-only-patched/linux/driver.c 2008-01-26 21:13:24.317610225 +0100 @@ -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; }