summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2015-09-19 21:08:41 +0200
committerAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2015-09-19 21:10:23 +0200
commite326cd4988465b5534b2c00ceaa49752ef6e7ce8 (patch)
treefd250d6b9d2bcaed480edd34fc5ad1683b1b1221 /app-emulation
parentnet-misc/openconnect: amd64 stable wrt bug #558968 (diff)
downloadgentoo-e326cd4988465b5534b2c00ceaa49752ef6e7ce8.tar.gz
gentoo-e326cd4988465b5534b2c00ceaa49752ef6e7ce8.tar.bz2
gentoo-e326cd4988465b5534b2c00ceaa49752ef6e7ce8.zip
app-emulation/vmware-modules: Add patch for Kernel 4.2, bug 559602
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/files/279-4.2-00-cookie.patch79
-rw-r--r--app-emulation/vmware-modules/vmware-modules-279.6.ebuild1
2 files changed, 80 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/279-4.2-00-cookie.patch b/app-emulation/vmware-modules/files/279-4.2-00-cookie.patch
new file mode 100644
index 000000000000..e2ab8a15f16b
--- /dev/null
+++ b/app-emulation/vmware-modules/files/279-4.2-00-cookie.patch
@@ -0,0 +1,79 @@
+See https://bugs.gentoo.org/show_bug.cgi?id=559602
+Patch by Mike Auty <ikelos@gentoo.org>
+
+diff --git a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
+index 4811abd..2cbc1f6 100644
+--- a/vmblock-only/linux/inode.c
++++ b/vmblock-only/linux/inode.c
+@@ -38,7 +38,9 @@
+ static struct dentry *InodeOpLookup(struct inode *dir,
+ struct dentry *dentry, unsigned int flags);
+ static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+ static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
+ #else
+ static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
+@@ -207,7 +209,12 @@ static void *
+ static int
+ #endif
+ InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
+- struct nameidata *nd) // OUT: stores result
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++ void **cookie
++#else
++ struct nameidata *nd
++#endif
++ ) // OUT: stores result
+ {
+ int ret;
+ VMBlockInodeInfo *iinfo;
+diff --git a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
+index acb2803..4811abd 100644
+--- a/vmblock-only/linux/inode.c
++++ b/vmblock-only/linux/inode.c
+@@ -199,7 +199,9 @@ InodeOpReadlink(struct dentry *dentry, // IN : dentry of symlink
+ *----------------------------------------------------------------------------
+ */
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++static const char *
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+ static void *
+ #else
+ static int
+@@ -222,8 +224,12 @@ InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink
+ goto out;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
++ return *cookie = (char *)(iinfo->name);
++#else
+ nd_set_link(nd, iinfo->name);
+ ret = 0;
++#endif
+
+ out:
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+diff --git a/vmnet-only/vmnetInt.h b/vmnet-only/vmnetInt.h
+index 23b5d19..d129f7b 100644
+--- a/vmnet-only/vmnetInt.h
++++ b/vmnet-only/vmnetInt.h
+@@ -78,8 +78,13 @@
+
+ extern struct proto vmnet_proto;
+ #ifdef VMW_NETDEV_HAS_NET
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+ # define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
+- PF_NETLINK, _pri, &vmnet_proto)
++ PF_NETLINK, _pri, &vmnet_proto, 1)
++# else
++# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
++ PF_NETLINK, _pri, &vmnet_proto)
++# endif
+ #else
+ # define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1)
+ #endif
diff --git a/app-emulation/vmware-modules/vmware-modules-279.6.ebuild b/app-emulation/vmware-modules/vmware-modules-279.6.ebuild
index 4a78931c0591..f10f4ee229bb 100644
--- a/app-emulation/vmware-modules/vmware-modules-279.6.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-279.6.ebuild
@@ -98,6 +98,7 @@ src_prepare() {
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-05-vmci_qpair.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-06-vsock.patch"
kernel_is ge 3 19 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.19-07-vsock.patch"
+ kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-00-cookie.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user