Permalink
Browse files

- fix kernelmodule build for kernel 4.4.169

- rel 3
  • Loading branch information...
janekr committed Dec 28, 2018
1 parent fbcc804 commit dce9c015acacd35e2af585d9adb904f81d4060b4
Showing with 43 additions and 1 deletion.
  1. +3 −1 VirtualBox.spec
  2. +40 −0 kernel-4.4.169.patch
@@ -42,7 +42,7 @@ exit 1

%define qtver 5.6.0

%define rel 2
%define rel 3
%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
@@ -81,6 +81,7 @@ Patch13: %{pname}-no-scrextend.patch
Patch14: %{pname}-multipython.patch
Patch15: %{pname}-lightdm-1.19.2.patch
Patch16: %{pname}-no-vboxvideo.patch
Patch17: kernel-4.4.169.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
@@ -568,6 +569,7 @@ tar -zxf guest-modules.tar.gz -C GuestDrivers
../src/VBox/HostDrivers/linux/export_modules.sh --file host-modules.tar.gz --without-hardening
tar -zxf host-modules.tar.gz -C HostDrivers
cd -
%patch17 -p1
%endif

# using system kBuild package
@@ -0,0 +1,40 @@
--- VirtualBox-6.0.0/PLD-MODULE-BUILD/HostDrivers/vboxdrv/r0drv/linux/memobj-r0drv-linux.c~ 2018-12-28 14:24:08.000000000 +0100
+++ VirtualBox-6.0.0/PLD-MODULE-BUILD/HostDrivers/vboxdrv/r0drv/linux/memobj-r0drv-linux.c 2018-12-28 14:35:39.146820962 +0100
@@ -1027,7 +1027,7 @@

/* openSUSE Leap 42.3 detection :-/ */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) \
- && LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) \
+ && LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 169) \
&& defined(FAULT_FLAG_REMOTE)
# define GET_USER_PAGES_API KERNEL_VERSION(4, 10, 0) /* no typo! */
#else
@@ -1113,7 +1113,7 @@
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, 4, 169)
fWrite ? FOLL_WRITE | /* Write to memory. */
FOLL_FORCE /* force write access. */
: 0, /* Write to memory. */
--- VirtualBox-6.0.0/PLD-MODULE-BUILD/GuestDrivers/vboxguest/r0drv/linux/memobj-r0drv-linux.c~ 2018-12-28 23:06:27.000000000 +0900
+++ VirtualBox-6.0.0/PLD-MODULE-BUILD/GuestDrivers/vboxguest/r0drv/linux/memobj-r0drv-linux.c 2018-12-28 23:17:25.075959807 +0900
@@ -1027,7 +1027,7 @@

/* openSUSE Leap 42.3 detection :-/ */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) \
- && LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) \
+ && LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 169) \
&& defined(FAULT_FLAG_REMOTE)
# define GET_USER_PAGES_API KERNEL_VERSION(4, 10, 0) /* no typo! */
#else
@@ -1113,7 +1113,7 @@
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, 4, 169)
fWrite ? FOLL_WRITE | /* Write to memory. */
FOLL_FORCE /* force write access. */
: 0, /* Write to memory. */

0 comments on commit dce9c01

Please sign in to comment.