You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch

34 lines
1.1 KiB

diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
index 1a0e753..089aba3 100644
--- a/vmmon-only/linux/driver.c
+++ b/vmmon-only/linux/driver.c
@@ -170,6 +170,7 @@ static int LinuxDriver_Open(struct inode *inode, struct file *filp);
static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
u_int iocmd, unsigned long ioarg);
#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
+#define VMW_HAVE_UNLOCKED_IOCTL
static long LinuxDriver_UnlockedIoctl(struct file *filp,
u_int iocmd, unsigned long ioarg);
#endif
diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index 5847323..9042b97 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -3702,7 +3702,7 @@ HostIFDoIoctl(struct file *filp,
if (filp->f_op->unlocked_ioctl) {
return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg);
}
-#endif
+#else
if (filp->f_op->ioctl) {
long err;
@@ -3712,6 +3712,7 @@ HostIFDoIoctl(struct file *filp,
return err;
}
+#endif
return -ENOIOCTLCMD;
}