diff options
author | 2016-03-16 22:26:30 -0400 | |
---|---|---|
committer | 2016-03-16 22:26:30 -0400 | |
commit | 11f4e961c166dba8df17de09a97b6826a41f28c6 (patch) | |
tree | b292fe1b1f1f2caa25906d56aa1663bc65c3f869 /app-emulation/vmware-modules | |
parent | app-emulation/vmware-modules: (diff) | |
download | vmware-11f4e961c166dba8df17de09a97b6826a41f28c6.tar.gz vmware-11f4e961c166dba8df17de09a97b6826a41f28c6.tar.bz2 vmware-11f4e961c166dba8df17de09a97b6826a41f28c6.zip |
app-emulation/vmware-modules: compiles on 4.5 kernels now
Package-Manager: portage-2.2.26
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r-- | app-emulation/vmware-modules/files/304-4.5-00-get_link.patch | 67 | ||||
-rw-r--r-- | app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.5-00-get_link.patch b/app-emulation/vmware-modules/files/304-4.5-00-get_link.patch new file mode 100644 index 0000000..169fc71 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.5-00-get_link.patch @@ -0,0 +1,67 @@ +diff -rupN vmblock-only/linux/inode.c vmblock-only.new/linux/inode.c +--- vmblock-only/linux/inode.c 2016-03-16 22:22:00.470080630 -0400 ++++ vmblock-only.new/linux/inode.c 2016-03-16 22:23:33.016081859 -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(4, 2, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++const char *InodeOpGetLink(struct dentry *dentry, struct inode *inode, struct delayed_call *done); ++#elif 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); +@@ -63,7 +65,11 @@ static struct inode_operations LinkInode + struct inode_operations LinkInodeOps = { + #endif + .readlink = InodeOpReadlink, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++ .get_link = InodeOpGetLink, ++#else + .follow_link = InodeOpFollowlink, ++#endif + }; + + /* +@@ -222,7 +228,9 @@ InodeOpReadlink(struct dentry *dentry, + * + *---------------------------------------------------------------------------- + */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++const char *InodeOpGetLink(struct dentry *dentry, struct inode *inode, struct delayed_call *done) ++#elif 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) +@@ -238,18 +246,28 @@ InodeOpFollowlink(struct dentry *dentry, + VMBlockInodeInfo *iinfo; + + if (!dentry) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++ ret = -ECHILD; ++#else + Warning("InodeOpReadlink: invalid args from kernel\n"); + ret = -EINVAL; ++#endif + goto out; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++ iinfo = INODE_TO_IINFO(inode); ++#else + iinfo = INODE_TO_IINFO(dentry->d_inode); ++#endif + if (!iinfo) { + ret = -EINVAL; + goto out; + } + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) ++ return (char *)(iinfo->name); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) + return *cookie = (char *)(iinfo->name); + #else + nd_set_link(nd, iinfo->name); diff --git a/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild index 766eb32..86bea59 100644 --- a/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild @@ -100,6 +100,7 @@ src_prepare() { 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" kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.3-00-misc_deregister.patch" + kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.5-00-get_link.patch" # Allow user patches so they can support RC kernels and whatever else epatch_user |