diff -Nru virtualbox-4.3.10-dfsg/debian/changelog virtualbox-4.3.10-dfsg/debian/changelog --- virtualbox-4.3.10-dfsg/debian/changelog 2014-04-06 15:31:44.000000000 +0200 +++ virtualbox-4.3.10-dfsg/debian/changelog 2015-01-19 10:48:33.000000000 +0100 @@ -1,3 +1,10 @@ +virtualbox (4.3.10-dfsg-1ubuntu2) trusty; urgency=medium + + * Add support for Virtualbox host kernel modules on Linux 3.16 + - 39-add-support-for-linux-3-16.patch (LP: #1411507). + + -- Gianfranco Costamagna Mon, 19 Jan 2015 09:48:09 +0100 + virtualbox (4.3.10-dfsg-1) unstable; urgency=high * New upstream release. diff -Nru virtualbox-4.3.10-dfsg/debian/patches/39-add-support-for-linux-3-16.patch virtualbox-4.3.10-dfsg/debian/patches/39-add-support-for-linux-3-16.patch --- virtualbox-4.3.10-dfsg/debian/patches/39-add-support-for-linux-3-16.patch 1970-01-01 01:00:00.000000000 +0100 +++ virtualbox-4.3.10-dfsg/debian/patches/39-add-support-for-linux-3-16.patch 2015-01-19 10:48:15.000000000 +0100 @@ -0,0 +1,82 @@ +diff --git a/src/VBox/Additions/linux/sharedfolders/regops.c b/src/VBox/Additions/linux/sharedfolders/regops.c +index a3bbd69..d5ba778 100644 +--- a/src/VBox/Additions/linux/sharedfolders/regops.c ++++ b/src/VBox/Additions/linux/sharedfolders/regops.c +@@ -574,8 +574,13 @@ struct file_operations sf_reg_fops = + # else + .sendfile = generic_file_sendfile, + # endif ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) ++ .read_iter = generic_file_read_iter, ++ .write_iter = generic_file_write_iter, ++# else + .aio_read = generic_file_aio_read, + .aio_write = generic_file_aio_write, ++# endif + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + .fsync = noop_fsync, + # else +--- a/src/VBox/Additions/linux/drm/vboxvideo_drm.c ++++ b/src/VBox/Additions/linux/drm/vboxvideo_drm.c +@@ -97,6 +97,13 @@ + # endif + #endif + ++/* The first of these was introduced when drm was generalised to work with ++ * non-PCI buses, but was removed between 3.15 and 3.16. The second is a ++ * random definition introduced in the mean-time. */ ++#if defined(DRIVER_BUS_PCI) || defined(DRIVER_PRIME) ++# define DRM_NEW_BUS_INIT 1 ++#endif ++ + static struct pci_device_id pciidlist[] = { + vboxvideo_PCI_IDS + }; +@@ -105,11 +105,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist); + + int vboxvideo_driver_load(struct drm_device * dev, unsigned long flags) + { +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) +- return drm_vblank_init(dev, 1); +-#else + return 0; +-#endif + } + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_FOPS_AS_POINTER) + /* since linux-3.3.0-rc1 drm_driver::fops is pointer */ +@@ -155,7 +162,7 @@ static struct drm_driver driver = + #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_FOPS_AS_POINTER) */ + .fops = &driver_fops, + #endif +-#ifndef DRIVER_BUS_PCI ++#ifndef DRM_NEW_BUS_INIT + .pci_driver = + { + .name = DRIVER_NAME, +@@ -170,7 +177,7 @@ static struct drm_driver driver = + .patchlevel = DRIVER_PATCHLEVEL, + }; + +-#ifdef DRIVER_BUS_PCI ++#ifdef DRM_NEW_BUS_INIT + static struct pci_driver pci_driver = + { + .name = DRIVER_NAME, +@@ -180,7 +187,7 @@ static struct pci_driver pci_driver = + + static int __init vboxvideo_init(void) + { +-#ifndef DRIVER_BUS_PCI ++#ifndef DRM_NEW_BUS_INIT + return drm_init(&driver); + #else + return drm_pci_init(&driver, &pci_driver); +@@ -189,7 +196,7 @@ static int __init vboxvideo_init(void) + + static void __exit vboxvideo_exit(void) + { +-#ifndef DRIVER_BUS_PCI ++#ifndef DRM_NEW_BUS_INIT + drm_exit(&driver); + #else + drm_pci_exit(&driver, &pci_driver); diff -Nru virtualbox-4.3.10-dfsg/debian/patches/series virtualbox-4.3.10-dfsg/debian/patches/series --- virtualbox-4.3.10-dfsg/debian/patches/series 2014-04-05 22:23:56.000000000 +0200 +++ virtualbox-4.3.10-dfsg/debian/patches/series 2015-01-19 09:49:54.000000000 +0100 @@ -14,3 +14,4 @@ 32-disable-guest-version-check.patch 35-libvdeplug-soname.patch 36-fix-vnc-version-string.patch +39-add-support-for-linux-3-16.patch