tkurbad-overlay/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.28-udp.patch

35 lines
1.2 KiB
Diff
Raw Normal View History

diff --git a/work/vboxnetflt/linux/VBoxNetFlt-linux.c b/work/vboxnetflt/linux/VBoxNetFlt-linux.c
index f824654..b61d82c 100644
--- work/vboxnetflt/linux/VBoxNetFlt-linux.c
+++ work/vboxnetflt/linux/VBoxNetFlt-linux.c
@@ -126,6 +126,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOXNETFLTNOTIFIER;
# endif
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#define SKB_GSO_UDP 0
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
# define VBOX_HAVE_SKB_VLAN
#else
diff --git a/work/vboxpci/linux/VBoxPci-linux.c b/work/vboxpci/linux/VBoxPci-linux.c
index 2dbf47f..e361ef3 100644
--- work/vboxpci/linux/VBoxPci-linux.c
+++ work/vboxpci/linux/VBoxPci-linux.c
@@ -353,12 +353,16 @@ static void vboxPciFileClose(struct file* file)
static int vboxPciFileWrite(struct file* file, unsigned long long offset, unsigned char* data, unsigned int size)
{
int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+ ret = kernel_write(file, data, size, &offset);
+#else
mm_segment_t fs_save;
fs_save = get_fs();
set_fs(get_ds());
ret = vfs_write(file, data, size, &offset);
set_fs(fs_save);
+#endif
if (ret < 0)
printk(KERN_DEBUG "vboxPciFileWrite: error %d\n", ret);