1 diff -ru vmmon-only/include/compat_semaphore.h vmmon-only/include/compat_semaphore.h
2 --- vmmon-only/include/compat_semaphore.h 2011-01-11 21:55:57.028999997 +0100
3 +++ vmmon-only/include/compat_semaphore.h 2011-01-11 21:58:57.529999998 +0100
8 +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
9 + #ifndef DECLARE_MUTEX
10 + #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
13 + #define init_MUTEX(_m) sema_init(_m,1)
17 #endif /* __COMPAT_SEMAPHORE_H__ */
18 diff -ru vmmon-only/linux/driver.c vmmon-only/linux/driver.c.orig
19 --- vmmon-only/linux/driver.c 2011-01-31 12:41:29.236666671 +0100
20 +++ vmmon-only/linux/driver.c.orig 2010-11-11 21:37:22.000000000 +0100
23 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
24 (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
25 -# define kernel_locked_by_current() (current->lock_depth >= 0)
26 +# define kernel_locked_by_current() kernel_locked()
28 # define kernel_locked_by_current() 0
30 --- vmmon-only/linux/driver.c.orig 2010-09-21 04:14:54.000000000 -0400
31 +++ vmmon-only/linux/driver.c 2010-11-19 17:22:02.338155199 -0500
33 memset(&vmuser_fops, 0, sizeof vmuser_fops);
34 vmuser_fops.owner = THIS_MODULE;
35 vmuser_fops.poll = LinuxDriverPoll;
36 -#ifdef VMW_HAVE_UNLOCKED_IOCTL
37 +#if defined(VMW_HAVE_UNLOCKED_IOCTL) || defined(HAVE_UNLOCKED_IOCTL)
38 vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
40 vmuser_fops.ioctl = LinuxDriver_Ioctl;