forked from pool/virtualbox
dfb7c858b0
Update to build on kernel 4.14 OBS-URL: https://build.opensuse.org/request/show/527433 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=363
17 lines
681 B
Diff
17 lines
681 B
Diff
Index: VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
|
===================================================================
|
|
--- VirtualBox-5.1.28.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
|
+++ VirtualBox-5.1.28/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
|
@@ -357,7 +357,11 @@ static int vboxPciFileWrite(struct file*
|
|
|
|
fs_save = get_fs();
|
|
set_fs(get_ds());
|
|
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
|
+ ret = kernel_write(file, data, size, &offset);
|
|
+#else
|
|
ret = vfs_write(file, data, size, &offset);
|
|
+#endif
|
|
set_fs(fs_save);
|
|
if (ret < 0)
|
|
printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret);
|