diff options
author | 2016-03-16 21:44:05 -0400 | |
---|---|---|
committer | 2016-03-16 21:44:05 -0400 | |
commit | 0ecc3a12322a6ed9456cbb5d5d9136a2699280a8 (patch) | |
tree | 407d4e49908da09720a78f2bbd25345206b77160 /app-emulation/vmware-modules | |
parent | updating some meta-data (diff) | |
download | vmware-0ecc3a12322a6ed9456cbb5d5d9136a2699280a8.tar.gz vmware-0ecc3a12322a6ed9456cbb5d5d9136a2699280a8.tar.bz2 vmware-0ecc3a12322a6ed9456cbb5d5d9136a2699280a8.zip |
app-emulation/vmware-modules:
now vmware-modules:11 compiles cleanly on 4.2
Package-Manager: portage-2.2.26
Diffstat (limited to 'app-emulation/vmware-modules')
5 files changed, 153 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch b/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch new file mode 100644 index 0000000..e6f2acb --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch @@ -0,0 +1,45 @@ +diff -rupN vmblock-only/linux/inode.c vmblock-only.new/linux/inode.c +--- vmblock-only/linux/inode.c 2016-03-16 21:24:25.771034759 -0400 ++++ vmblock-only.new/linux/inode.c 2016-03-16 21:26:22.697036311 -0400 +@@ -44,7 +44,9 @@ static struct dentry *InodeOpLookup(stru + static int InodeOpReadlink(struct dentry *, char __user *, int); + #endif + +-#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); +@@ -220,7 +222,9 @@ InodeOpReadlink(struct dentry *dentry, + * + *---------------------------------------------------------------------------- + */ +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) + static void * + #else +@@ -228,6 +232,7 @@ static int + #endif + InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink + struct nameidata *nd) // OUT: stores result ++#endif + { + int ret; + VMBlockInodeInfo *iinfo; +@@ -244,7 +249,11 @@ InodeOpFollowlink(struct dentry *dentry, + goto out; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ return *cookie = (char *)(iinfo->name); ++#else + nd_set_link(nd, iinfo->name); ++#endif + + out: + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) diff --git a/app-emulation/vmware-modules/files/304-4.2-01-vmci_vmalloc.patch b/app-emulation/vmware-modules/files/304-4.2-01-vmci_vmalloc.patch new file mode 100644 index 0000000..2296c06 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.2-01-vmci_vmalloc.patch @@ -0,0 +1,13 @@ +diff -rupN vmci-only/linux/driver.c vmci-only.new/linux/driver.c +--- vmci-only/linux/driver.c 2015-11-03 19:27:55.000000000 -0500 ++++ vmci-only.new/linux/driver.c 2016-03-16 21:30:47.646039829 -0400 +@@ -26,6 +26,9 @@ + + #include <linux/file.h> + #include <linux/fs.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++#include <linux/vmalloc.h> ++#endif + #include <linux/init.h> + #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) + # include <linux/ioctl32.h> diff --git a/app-emulation/vmware-modules/files/304-4.2-02-vsock.patch b/app-emulation/vmware-modules/files/304-4.2-02-vsock.patch new file mode 100644 index 0000000..bdac109 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.2-02-vsock.patch @@ -0,0 +1,77 @@ +diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c +--- vsock-only/linux/af_vsock.c 2016-03-16 21:31:24.582040320 -0400 ++++ vsock-only.new/linux/af_vsock.c 2016-03-16 21:37:22.140045067 -0400 +@@ -231,7 +231,16 @@ static int VSockVmciStreamSetsockopt(str + + static int VSockVmciStreamGetsockopt(struct socket *sock, int level, int optname, + char __user *optval, int __user * optlen); +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++static int VSockVmciDgramSendmsg( ++ struct socket *sock, struct msghdr *msg, size_t len); ++static int VSockVmciDgramRecvmsg(struct socket *sock, ++ struct msghdr *msg, size_t len, int flags); ++static int VSockVmciStreamSendmsg( ++ struct socket *sock, struct msghdr *msg, size_t len); ++static int VSockVmciStreamRecvmsg(struct socket *sock, ++ struct msghdr *msg, size_t len, int flags); ++#else + static int VSockVmciDgramSendmsg(struct kiocb *kiocb, + struct socket *sock, struct msghdr *msg, size_t len); + static int VSockVmciDgramRecvmsg(struct kiocb *kiocb, struct socket *sock, +@@ -240,6 +249,7 @@ static int VSockVmciStreamSendmsg(struct + struct socket *sock, struct msghdr *msg, size_t len); + static int VSockVmciStreamRecvmsg(struct kiocb *kiocb, struct socket *sock, + struct msghdr *msg, size_t len, int flags); ++#endif + + static int VSockVmciCreate( + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +@@ -4210,7 +4220,11 @@ VSockVmciShutdown(struct socket *sock, + */ + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++VSockVmciDgramSendmsg( ++#else + VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED ++#endif + struct socket *sock, // IN: socket to send on + struct msghdr *msg, // IN: message to send + size_t len) // IN: length of message +@@ -4540,7 +4554,11 @@ VSockVmciStreamGetsockopt(struct socket + */ + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++VSockVmciStreamSendmsg( ++#else + VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED ++#endif + struct socket *sock, // IN: socket to send on + struct msghdr *msg, // IN: message to send + size_t len) // IN: length of message +@@ -4709,7 +4727,11 @@ out: + */ + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++VSockVmciDgramRecvmsg( ++#else + VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED ++#endif + struct socket *sock, // IN: socket to receive from + struct msghdr *msg, // IN/OUT: message to receive into + size_t len, // IN: length of receive buffer +@@ -4804,7 +4826,11 @@ out: + */ + + static int ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++VSockVmciStreamRecvmsg( ++#else + VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED ++#endif + struct socket *sock, // IN: socket to receive from + struct msghdr *msg, // IN/OUT: message to receive into + size_t len, // IN: length of receive buffer diff --git a/app-emulation/vmware-modules/files/304-4.2-03-vsock.patch b/app-emulation/vmware-modules/files/304-4.2-03-vsock.patch new file mode 100644 index 0000000..a2504a6 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.2-03-vsock.patch @@ -0,0 +1,14 @@ +diff -rupN vsock-only/linux/af_vsock.c vsock-only.new/linux/af_vsock.c +--- vsock-only/linux/af_vsock.c 2016-03-16 21:38:01.401045589 -0400 ++++ vsock-only.new/linux/af_vsock.c 2016-03-16 21:39:32.529046799 -0400 +@@ -2836,7 +2836,9 @@ __VSockVmciCreate(struct net *net, + * network namespace, and the option to zero the sock was dropped. + * + */ +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto, 1); ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) + sk = sk_alloc(vsockVmciFamilyOps.family, priority, + vsockVmciProto.slab_obj_size, vsockVmciProto.slab); + #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) diff --git a/app-emulation/vmware-modules/vmware-modules-304.3.ebuild b/app-emulation/vmware-modules/vmware-modules-304.3.ebuild index 0980673..a77203d 100644 --- a/app-emulation/vmware-modules/vmware-modules-304.3.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-304.3.ebuild @@ -95,6 +95,10 @@ 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-inode_op.patch" + kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-01-vmci_vmalloc.patch" + kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-02-vsock.patch" + kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-03-vsock.patch" # Allow user patches so they can support RC kernels and whatever else epatch_user |