diff -Nru virtualbox-hwe-5.1.38-dfsg/debian/changelog virtualbox-hwe-5.1.38-dfsg/debian/changelog --- virtualbox-hwe-5.1.38-dfsg/debian/changelog 2018-07-09 17:10:10.000000000 +0200 +++ virtualbox-hwe-5.1.38-dfsg/debian/changelog 2019-02-28 16:07:03.000000000 +0100 @@ -1,3 +1,11 @@ +virtualbox-hwe (5.1.38-dfsg-0ubuntu1.16.04.2) xenial; urgency=medium + + * debian/patches/fix-compile-for-xenial-kernel.patch + - Fix for LP: #1818049 (virtualbox dkms modules fail to build with + linux 4.4.0-143.169) + + -- Kleber Sacilotto de Souza Thu, 28 Feb 2019 16:06:20 +0100 + virtualbox-hwe (5.1.38-dfsg-0ubuntu1.16.04.1) xenial; urgency=medium * Build only the guest-* packages with hwe stack diff -Nru virtualbox-hwe-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch virtualbox-hwe-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch --- virtualbox-hwe-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch 1970-01-01 01:00:00.000000000 +0100 +++ virtualbox-hwe-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch 2019-02-28 16:05:53.000000000 +0100 @@ -0,0 +1,38 @@ +Description: fix compilation after get_user_pages() API change +Author: Kleber Sacilotto de Souza +=================================================================== +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -1074,7 +1074,9 @@ + if (R0Process == RTR0ProcHandleSelf()) + rc = get_user_pages(R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ +@@ -1094,7 +1096,9 @@ + pTask->mm, /* Whose pages. */ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ +@@ -1113,7 +1117,9 @@ + pTask->mm, /* Whose pages. */ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ diff -Nru virtualbox-hwe-5.1.38-dfsg/debian/patches/series virtualbox-hwe-5.1.38-dfsg/debian/patches/series --- virtualbox-hwe-5.1.38-dfsg/debian/patches/series 2018-07-09 17:10:10.000000000 +0200 +++ virtualbox-hwe-5.1.38-dfsg/debian/patches/series 2019-02-28 16:04:08.000000000 +0100 @@ -17,3 +17,4 @@ new-xorg-1.19.patch 37-python-3.6-support.patch 69989.patch +fix-compile-for-xenial-kernel.patch