summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Auty <ikelos@gentoo.org>2009-04-07 21:45:26 +0000
committerMike Auty <ikelos@gentoo.org>2009-04-07 21:45:26 +0000
commit99d409113975c9f35e9166b29eb8846fb190e9c3 (patch)
tree8351f79c5b515fb402b3419f08723340e35ba6e3 /app-emulation
parentMake sure vmware-workstation-6.5.2 is ~arch. (diff)
downloadvmware-99d409113975c9f35e9166b29eb8846fb190e9c3.tar.gz
vmware-99d409113975c9f35e9166b29eb8846fb190e9c3.tar.bz2
vmware-99d409113975c9f35e9166b29eb8846fb190e9c3.zip
Update modules based on a patch from Mikhail Krivtsov.
svn path=/trunk/; revision=372
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/Manifest2
-rw-r--r--app-emulation/vmware-modules/files/1.0.0.23-r1-kernel-2.6.29.patch436
2 files changed, 222 insertions, 216 deletions
diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
index 2ef9b73..dbbe16d 100644
--- a/app-emulation/vmware-modules/Manifest
+++ b/app-emulation/vmware-modules/Manifest
@@ -1,5 +1,5 @@
AUX 1.0.0.23-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
-AUX 1.0.0.23-r1-kernel-2.6.29.patch 10395 RMD160 4e5d6d0857766ac695c9e5960d32a03df8362256 SHA1 26f1ea8c952c71d2c4879a19d531581eb83312f3 SHA256 bca6eae65cd536ceebd6ed4b4122076edd43b4f7fd23518040523495387f81ca
+AUX 1.0.0.23-r1-kernel-2.6.29.patch 10451 RMD160 2f0094a87ae9530e6a5937f6b3dc3bdeeebe2370 SHA1 86d4f265ecb7921dae4a5cf6531c85f5c4dde82e SHA256 c1f0467f9326f39fbfe81027f26fac478eeb5136f0c06c102e4d3b029971d021
AUX patches/000_all_makefile-include-directory.patch 342 RMD160 ae8b7c2e628681fff153bfa10242e62df5ab2e10 SHA1 be4f203063e676dc022ce600e15479b6ea56b954 SHA256 2da16602ef3c4cb040ac80a9fed18660fadcae2e843f425da0872f50aa5356db
AUX patches/020_all_epoll-def-warnings.patch 435 RMD160 b9152d9af93862c99c72abc1ef97639351d82141 SHA1 d0a40f0483a144fc98d02213c6c63b2e2ddb9f66 SHA256 2033f23fc8d696e1a9d20c6c446703166ea82a4e5e448494e6a52ef09bac7521
AUX patches/vmblock/010_all_kernel-2.6.25.patch 2398 RMD160 d0a3464f03486eda983b230d0bd90bca8a5d7ed3 SHA1 b5de035a7d1f0051a76512be7e25b04ff3d0dbdd SHA256 4036d37415cad6109e95e82c3789f32ea2c4901961612fb158d5f7148671b32e
diff --git a/app-emulation/vmware-modules/files/1.0.0.23-r1-kernel-2.6.29.patch b/app-emulation/vmware-modules/files/1.0.0.23-r1-kernel-2.6.29.patch
index 707b588..a4ad6e9 100644
--- a/app-emulation/vmware-modules/files/1.0.0.23-r1-kernel-2.6.29.patch
+++ b/app-emulation/vmware-modules/files/1.0.0.23-r1-kernel-2.6.29.patch
@@ -1,282 +1,288 @@
-diff -Naur orig/vmblock-only/include/compat_wait.h new/vmblock-only/include/compat_wait.h
---- orig/vmblock-only/include/compat_wait.h 2008-10-28 22:47:20.000000000 -0700
-+++ new/vmblock-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700
-@@ -75,7 +75,11 @@
- #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmblock-only/Makefile.kernel vmware-modules-1.0.0.23-r1/work/vmblock-only/Makefile.kernel
+--- vmware-modules-1.0.0.23-r1.0/work/vmblock-only/Makefile.kernel 2009-03-27 08:05:21.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmblock-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400
+@@ -19,7 +19,7 @@
- /* If prototype does not match, build will abort here */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- extern void poll_initwait(compat_poll_wqueues *);
-+#else
-+extern void poll_initwait(struct poll_wqueues *pwq);
-+#endif
+ INCLUDE := -I$(SRCROOT)/include
- #define compat_poll_initwait(wait, table) ( \
- (wait) = (table), \
-diff -Naur orig/vmci-only/include/compat_wait.h new/vmci-only/include/compat_wait.h
---- orig/vmci-only/include/compat_wait.h 2008-10-28 22:47:21.000000000 -0700
-+++ new/vmci-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700
-@@ -75,7 +75,11 @@
- #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- /* If prototype does not match, build will abort here */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- extern void poll_initwait(compat_poll_wqueues *);
-+#else
-+extern void poll_initwait(struct poll_wqueues *pwq);
-+#endif
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmci-only/Makefile.kernel vmware-modules-1.0.0.23-r1/work/vmci-only/Makefile.kernel
+--- vmware-modules-1.0.0.23-r1.0/work/vmci-only/Makefile.kernel 2009-03-27 08:05:22.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmci-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400
+@@ -21,7 +21,7 @@
- #define compat_poll_initwait(wait, table) ( \
- (wait) = (table), \
-diff -Naur orig/vmmon-only/include/compat_wait.h new/vmmon-only/include/compat_wait.h
---- orig/vmmon-only/include/compat_wait.h 2008-10-28 22:47:18.000000000 -0700
-+++ new/vmmon-only/include/compat_wait.h 2009-01-20 04:49:44.000000000 -0700
-@@ -75,7 +75,11 @@
- #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux
- /* If prototype does not match, build will abort here */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- extern void poll_initwait(compat_poll_wqueues *);
-+#else
-+extern void poll_initwait(struct poll_wqueues *pwq);
-+#endif
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- #define compat_poll_initwait(wait, table) ( \
- (wait) = (table), \
-diff -Naur orig/vmmon-only/linux/driver.c new/vmmon-only/linux/driver.c
---- orig/vmmon-only/linux/driver.c 2008-10-28 22:47:18.000000000 -0700
-+++ new/vmmon-only/linux/driver.c 2009-01-20 04:49:44.000000000 -0700
-@@ -1984,10 +1984,17 @@
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmmon-only/linux/driver.c vmware-modules-1.0.0.23-r1/work/vmmon-only/linux/driver.c
+--- vmware-modules-1.0.0.23-r1.0/work/vmmon-only/linux/driver.c 2009-03-27 08:05:19.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmmon-only/linux/driver.c 2009-04-07 16:15:11.000000000 +0400
+@@ -1984,10 +1984,10 @@
}
case IOCTL_VMX86_ALLOW_CORE_DUMP:
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- if (current->euid == current->uid &&
- current->fsuid == current->uid &&
- current->egid == current->gid &&
- current->fsgid == current->gid) {
-+#else /* 2.6.29 and higher */
-+ if (current->cred->euid == current->cred->uid &&
-+ current->cred->fsuid == current->cred->uid &&
-+ current->cred->egid == current->cred->gid &&
-+ current->cred->fsgid == current->cred->gid) {
-+#endif /* 2.6.29 check */
+- if (current->euid == current->uid &&
+- current->fsuid == current->uid &&
+- current->egid == current->gid &&
+- current->fsgid == current->gid) {
++ if (current_euid() == current_uid() &&
++ current_fsuid() == current_uid() &&
++ current_egid() == current_gid() &&
++ current_fsgid() == current_gid()) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE)
/* Dump core, readable by user. */
set_bit(MMF_DUMPABLE, &current->mm->flags);
-diff -Naur orig/vmmon-only/linux/hostif.c new/vmmon-only/linux/hostif.c
---- orig/vmmon-only/linux/hostif.c 2008-10-28 22:47:17.000000000 -0700
-+++ new/vmmon-only/linux/hostif.c 2009-01-20 04:49:44.000000000 -0700
-@@ -2718,13 +2718,22 @@
- set_fs(get_ds());
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmmon-only/linux/hostif.c vmware-modules-1.0.0.23-r1/work/vmmon-only/linux/hostif.c
+--- vmware-modules-1.0.0.23-r1.0/work/vmmon-only/linux/hostif.c 2009-03-27 08:05:18.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmmon-only/linux/hostif.c 2009-04-07 16:19:05.000000000 +0400
+@@ -3424,6 +3424,82 @@
+ }
+
- {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++static inline
++void compat_cap_raise(int cap)
++{
++ cap_raise(current->cap_effective, cap);
++}
++#else
++static
++void compat_cap_raise(int cap)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ cap_raise(new_cred->cap_effective, cap);
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_cap_raise(%d) prepare_creds(): Out of memory\n", cap);
++ }
++}
++#endif
++
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- compat_poll_wqueues table;
- poll_table *wait;
-+#else /* 2.6.29 and above */
-+ struct poll_wqueues table;
-+ struct poll_wqueues *wait;
-+#endif /* 2.6.29 and above */
- unsigned int mask;
-
- compat_poll_initwait(wait, &table);
- current->state = TASK_INTERRUPTIBLE;
++static inline
++void compat_cap_lower(int cap)
++{
++ cap_lower(current->cap_effective, cap);
++}
++#else
++static
++void compat_cap_lower(int cap)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ cap_lower(new_cred->cap_effective, cap);
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_cap_lower(%d) prepare_creds(): Out of memory\n", cap);
++ }
++}
++#endif
++
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- mask = file->f_op->poll(file, wait);
++static inline
++void compat_set_fsuid(int fsuid)
++{
++ current->fsuid = fsuid;
++}
+#else
-+ mask = file->f_op->poll(file, (poll_table *) wait);
-+#endif /* 2.6.29 */
- if (!(mask & (POLLIN | POLLERR | POLLHUP))) {
- #ifdef KERNEL_2_4_0
- vm->vmhost->vcpuSemaTask[vcpuid] = current;
-@@ -2743,7 +2752,6 @@
- }
-
- res = file->f_op->read(file, &ch, 1, &file->f_pos);
--
- set_fs(old_fs);
- compat_fput(file);
-
-@@ -3455,8 +3463,13 @@
++static
++void compat_set_fsuid(int fsuid)
++{
++ struct cred *new_cred;
++
++ new_cred = prepare_creds();
++ if (new_cred != NULL)
++ {
++ new_cred->fsuid = fsuid;
++ commit_creds(new_cred);
++ }
++ else
++ {
++ Log("compat_set_fsuid(%d) prepare_creds(): Out of memory\n", fsuid);
++ }
++}
++#endif
++
++
+ /*
+ *----------------------------------------------------------------------
+ *
+@@ -3456,7 +3532,7 @@
oldFS = get_fs();
set_fs(KERNEL_DS);
compat_allow_signal(SIGKILL);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
+- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
++ compat_cap_raise(CAP_SYS_RESOURCE);
compat_set_user_nice(current, linuxState.fastClockPriority);
-+#else /* 2.6.29 */
-+ (void) cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE);
-+ set_user_nice(current, linuxState.fastClockPriority);
-+#endif /* 2.6.29 and higher */
while (linuxState.fastClockRate > HZ + HZ/16) {
- unsigned long buf;
-@@ -3579,19 +3592,38 @@
+@@ -3580,19 +3656,19 @@
Bool cap;
long pid;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- fsuid = current->fsuid;
- current->fsuid = 0;
-+#else
-+ fsuid = current->cred->fsuid;
-+#warning current->cred->fsuid = 0;
-+#endif /* 2.6.29 */
+- fsuid = current->fsuid;
+- current->fsuid = 0;
++ fsuid = current_fsuid();
++ compat_set_fsuid(0);
filp = filp_open("/dev/rtc", O_RDONLY, 0);
-+
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- current->fsuid = fsuid;
-+#else
-+#warning current->cred->fsuid = fsuid;
-+#endif /* 2.6.29 */
+- current->fsuid = fsuid;
++ compat_set_fsuid(fsuid);
if (IS_ERR(filp)) {
Warning("/dev/rtc open failed: %d\n", (int)(VA)filp);
return -(int)(VA)filp;
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE);
- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-+#else /* 2.6.29 */
-+ cap = cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE);
-+ (void) cap_raised(current->cred->cap_effective, CAP_SYS_RESOURCE);
-+#endif /* 2.6.29 */
+- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE);
+- cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
++ cap = cap_raised(current_cap(), CAP_SYS_RESOURCE);
++ compat_cap_raise(CAP_SYS_RESOURCE);
res = HostIFDoIoctl(filp, RTC_PIE_ON, 0);
if (!cap) {
- cap_lower(current->cap_effective, CAP_SYS_RESOURCE);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
-+ cap_lower(current->cap_effective, CAP_SYS_RESOURCE);
-+#else
-+#warning cap_lower(current->cred->cap_effective, CAP_SYS_RESOURCE);
-+#endif /* 2.6.29 */
++ compat_cap_lower(CAP_SYS_RESOURCE);
}
if (res < 0) {
Warning("/dev/rtc enable interrupt failed: %d\n", res);
-diff -Naur orig/vmmon-only/linux/vmmonInt.h new/vmmon-only/linux/vmmonInt.h
---- orig/vmmon-only/linux/vmmonInt.h 2008-10-28 22:47:17.000000000 -0700
-+++ new/vmmon-only/linux/vmmonInt.h 2009-01-20 04:49:44.000000000 -0700
-@@ -46,7 +46,10 @@
- #endif
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmmon-only/Makefile.kernel vmware-modules-1.0.0.23-r1/work/vmmon-only/Makefile.kernel
+--- vmware-modules-1.0.0.23-r1.0/work/vmmon-only/Makefile.kernel 2009-03-27 08:05:19.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmmon-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -22,7 +22,7 @@
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
+ -I$(SRCROOT)/vmcore
- #if defined(CONFIG_SMP) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 8)
--#ifdef VMW_HAVE_SMP_CALL_3ARG
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
-+#define VMW_HAVE_SMP_CALL_3ARG
-+#endif
-+#ifdef VMW_HAVE_SMP_CALL_3ARG
- #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, wait)
- #else
- #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, 1, wait)
-diff -Naur orig/vmnet-only/bridge.c new/vmnet-only/bridge.c
---- orig/vmnet-only/bridge.c 2008-10-28 22:47:18.000000000 -0700
-+++ new/vmnet-only/bridge.c 2009-01-20 04:49:44.000000000 -0700
-@@ -646,7 +646,11 @@
- dev_unlock_list();
- } else {
- struct sock *sk = bridge->sk;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- atomic_add(skb->truesize, &sk->sk_wmem_alloc);
-+#else
-+#warning EHUD gotta figure out what this does and how to fix it: atomic_add(skb->truesize, &sk->sk_wmem_alloc);
-+#endif /* 2.6.29 */
- clone->sk = sk;
- clone->protocol = ((struct ethhdr *)skb->data)->h_proto; // XXX
- if ((dev->flags & IFF_UP) != 0) {
-diff -Naur orig/vmnet-only/compat_wait.h new/vmnet-only/compat_wait.h
---- orig/vmnet-only/compat_wait.h 2008-10-28 22:47:19.000000000 -0700
-+++ new/vmnet-only/compat_wait.h 2009-01-20 04:49:44.000000000 -0700
-@@ -75,7 +75,11 @@
- #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
- /* If prototype does not match, build will abort here */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- extern void poll_initwait(compat_poll_wqueues *);
-+#else /* 2.6.29 */
-+extern void poll_initwait(struct poll_wqueues *);
-+#endif /* 2.6.29 */
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmnet-only/Makefile.kernel vmware-modules-1.0.0.23-r1/work/vmnet-only/Makefile.kernel
+--- vmware-modules-1.0.0.23-r1.0/work/vmnet-only/Makefile.kernel 2009-03-27 08:05:20.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmnet-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -19,7 +19,7 @@
+
+ INCLUDE := -I$(SRCROOT)
- #define compat_poll_initwait(wait, table) ( \
- (wait) = (table), \
-diff -Naur orig/vmnet-only/driver.c new/vmnet-only/driver.c
---- orig/vmnet-only/driver.c 2008-10-28 22:47:19.000000000 -0700
-+++ new/vmnet-only/driver.c 2009-01-20 04:49:44.000000000 -0700
-@@ -146,6 +146,13 @@
- .owner = THIS_MODULE,
- .obj_size = sizeof(struct sock),
- };
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
-+struct proto vmnet_proto = {
-+ .name = "VMNET",
-+ .owner = THIS_MODULE,
-+ .obj_size = sizeof(struct sock),
-+};
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vmnet-only/netif.c vmware-modules-1.0.0.23-r1/work/vmnet-only/netif.c
+--- vmware-modules-1.0.0.23-r1.0/work/vmnet-only/netif.c 2009-03-27 08:05:20.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vmnet-only/netif.c 2009-04-07 16:15:21.000000000 +0400
+@@ -55,6 +55,30 @@
+ struct net_device_stats stats;
+ } VNetNetIF;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
++/*
++ Prior to KERNEL_VERSION(2, 6, 29) "struct net_device" had "void
++ *priv" field which was used as pointer to "VNetNetIF".
++*/
+
- #endif
++#define VNetNetIF_netdev_priv_size 0
++
++#define VNetNetIF_netdev_netIf(dev) (*(VNetNetIF**)&((dev)->priv))
++
++#else
++/*
++ Since KERNEL_VERSION(2, 6, 29) pointer to "VNetNetIF" is stored in
++ explicitly allocated private area.
++*/
++typedef struct {
++ VNetNetIF *netIf;
++} VNetNetIF_netdev_priv;
++
++#define VNetNetIF_netdev_priv_size sizeof(VNetNetIF_netdev_priv)
++
++#define VNetNetIF_netdev_netIf(dev) (((VNetNetIF_netdev_priv *)compat_netdev_priv(dev))->netIf)
++
++#endif
- /*
-diff -Naur orig/vmnet-only/netif.c new/vmnet-only/netif.c
---- orig/vmnet-only/netif.c 2008-10-28 22:47:18.000000000 -0700
-+++ new/vmnet-only/netif.c 2009-01-20 04:49:44.000000000 -0700
-@@ -324,7 +324,10 @@
+ static void VNetNetIfFree(VNetJack *this);
+ static void VNetNetIfReceive(VNetJack *this, struct sk_buff *skb);
+@@ -318,13 +342,13 @@
+ memcpy(netIf->devName, devName, sizeof netIf->devName);
+ NULL_TERMINATE_STRING(netIf->devName);
+
+- dev = compat_alloc_netdev(0, netIf->devName, VNetNetIfSetup);
++ dev = compat_alloc_netdev(VNetNetIF_netdev_priv_size, netIf->devName, VNetNetIfSetup);
+ if (!dev) {
+ retval = -ENOMEM;
goto out;
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- dev->priv = netIf;
-+#endif /* 2.6.29 */
-+
+- dev->priv = netIf;
++ VNetNetIF_netdev_netIf(dev) = netIf;
netIf->dev = dev;
memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr);
-@@ -566,7 +569,11 @@
+@@ -566,7 +590,7 @@
VNetNetifStartXmit(struct sk_buff *skb, // IN:
struct net_device *dev) // IN:
{
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
-+#else
-+ VNetNetIF *netIf = netdev_priv(dev);
-+#endif /* 2.6.29 */
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
if(skb == NULL) {
return 0;
-@@ -618,7 +625,12 @@
+@@ -618,7 +642,7 @@
VNetNetifSetMAC(struct net_device *dev, // IN:
void *p) // IN:
{
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
-+#else
-+ VNetNetIF *netIf = netdev_priv(dev);
-+#endif /* 2.6.29 */
-+
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
struct sockaddr const *addr = p;
if (!VMX86_IS_STATIC_MAC(addr->sa_data)) {
return -EINVAL;
-@@ -675,7 +687,11 @@
+@@ -675,7 +699,7 @@
struct net_device_stats *
VNetNetifGetStats(struct net_device *dev) // IN:
{
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
-+#else
-+ VNetNetIF *netIf = netdev_priv(dev);
-+#endif /* 2.6.29 */
+- VNetNetIF *netIf = (VNetNetIF*)dev->priv;
++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev);
return &(netIf->stats);
}
-diff -Naur orig/vsock-only/include/compat_wait.h new/vsock-only/include/compat_wait.h
---- orig/vsock-only/include/compat_wait.h 2009-01-20 14:11:34.000000000 +0100
-+++ new/vsock-only/include/compat_wait.h 2009-01-20 14:51:05.000000000 +0100
-@@ -75,7 +75,11 @@
- #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // {
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vsock-only/linux/util.c vmware-modules-1.0.0.23-r1/work/vsock-only/linux/util.c
+--- vmware-modules-1.0.0.23-r1.0/work/vsock-only/linux/util.c 2009-03-27 08:05:23.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vsock-only/linux/util.c 2009-04-07 16:15:21.000000000 +0400
+@@ -154,7 +154,7 @@
+ goto error;
+ }
- /* If prototype does not match, build will abort here */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
- extern void poll_initwait(compat_poll_wqueues *);
-+#else
-+extern void poll_initwait(struct poll_wqueues *pwq);
-+#endif
+- Log(buf);
++ Log("%s", buf);
+
+ return;
+
+diff -ur vmware-modules-1.0.0.23-r1.0/work/vsock-only/Makefile.kernel vmware-modules-1.0.0.23-r1/work/vsock-only/Makefile.kernel
+--- vmware-modules-1.0.0.23-r1.0/work/vsock-only/Makefile.kernel 2009-03-27 08:05:23.000000000 +0300
++++ vmware-modules-1.0.0.23-r1/work/vsock-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400
+@@ -25,7 +25,7 @@
+ INCLUDE += -I$(SRCROOT)/linux
+ INCLUDE += -I$(SRCROOT)/common
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
- #define compat_poll_initwait(wait, table) ( \
- (wait) = (table), \