From 6ddb4b0ea4cdcaa81b6a217b7b1a85dcc2c2e03bfb8d688141da8201cab18be8 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 3 Mar 2018 19:16:20 +0000 Subject: [PATCH] - Add file "fixes_for_4.16.patch" to handle API changes in kernel 4.16. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=408 --- fixes_for_4.16.patch | 30 ++++++++++++++++++++++++++++++ virtualbox.changes | 5 +++++ virtualbox.spec | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 fixes_for_4.16.patch diff --git a/fixes_for_4.16.patch b/fixes_for_4.16.patch new file mode 100644 index 0000000..227bf0d --- /dev/null +++ b/fixes_for_4.16.patch @@ -0,0 +1,30 @@ +Index: VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_ttm.c +=================================================================== +--- VirtualBox-5.2.8.orig/src/VBox/Additions/linux/drm/vbox_ttm.c ++++ VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_ttm.c +@@ -198,6 +198,17 @@ static void vbox_ttm_io_mem_free(struct + { + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) ++static int vbox_bo_move(struct ttm_buffer_object *bo, bool evict, ++ struct ttm_operation_ctx *ctx, ++ struct ttm_mem_reg *new_mem) ++{ ++ int r; ++ ++ r = ttm_bo_move_memcpy(bo, ctx, new_mem); ++ return r; ++} ++#else + static int vbox_bo_move(struct ttm_buffer_object *bo, + bool evict, bool interruptible, + bool no_wait_gpu, struct ttm_mem_reg *new_mem) +@@ -213,6 +224,7 @@ static int vbox_bo_move(struct ttm_buffe + #endif + return r; + } ++#endif + + static void vbox_ttm_backend_destroy(struct ttm_tt *tt) + { diff --git a/virtualbox.changes b/virtualbox.changes index 9fded6b..48e32e5 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 3 19:15:12 UTC 2018 - Larry.Finger@lwfinger.net + +- Add file "fixes_for_4.16.patch" to handle API changes in kernel 4.16. + ------------------------------------------------------------------- Wed Feb 28 20:08:22 UTC 2018 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index ed27830..9950160 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -115,6 +115,8 @@ Patch119: fixes_for_leap15.patch Patch120: fixes_for_python.patch # Remove vboxvideo from build Patch121: remove_vbox_video_build.patch +# Fix build for kernel 4.16 +Patch122: fixes_for_4.16.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -407,6 +409,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %endif %patch120 -p1 %patch121 -p1 +%patch122 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf