diff --git a/fixes-for-5.16.patch b/fixes-for-5.16.patch new file mode 100644 index 0000000..77ad9f8 --- /dev/null +++ b/fixes-for-5.16.patch @@ -0,0 +1,80 @@ +Index: VirtualBox-6.1.28/include/iprt/types.h +=================================================================== +--- VirtualBox-6.1.28.orig/include/iprt/types.h ++++ VirtualBox-6.1.28/include/iprt/types.h +@@ -90,8 +90,13 @@ RT_C_DECLS_END + * though they need to be long long unsigned and long long int). These + * defines conflict with our declaration in stdint.h. Adding the defines + * below omits the definitions in the system header. ++ * + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # define _UINT64_T_DECLARED + # define _INT64_T_DECLARED + # define _UINTPTR_T_DECLARED +@@ -131,13 +136,19 @@ RT_C_DECLS_END + * 3. Starting with 2.6.24, linux/types.h typedefs uintptr_t. + * We work around these issues here and nowhere else. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # if defined(__cplusplus) + typedef bool _Bool; + # endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # define bool linux_bool + # define true linux_true + # define false linux_false ++#endif + # define uintptr_t linux_uintptr_t + # include + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) +@@ -185,7 +196,11 @@ RT_C_DECLS_END + # undef true + # undef bool + # else ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + # include ++#else ++# include ++#endif + # include + # endif + +Index: VirtualBox-6.1.28/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +=================================================================== +--- VirtualBox-6.1.28.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h ++++ VirtualBox-6.1.28/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +@@ -35,7 +35,9 @@ + * Then use the linux bool type for all the stuff include here. + */ + #include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) + #define bool linux_bool ++#endif + + #if RT_GNUC_PREREQ(4, 6) + # pragma GCC diagnostic push +Index: VirtualBox-6.1.28/src/VBox/Runtime/include/internal/iprt.h +=================================================================== +--- VirtualBox-6.1.28.orig/src/VBox/Runtime/include/internal/iprt.h ++++ VirtualBox-6.1.28/src/VBox/Runtime/include/internal/iprt.h +@@ -41,8 +41,10 @@ + && defined(IN_RING0) \ + && defined(MODULE) \ + && !defined(RT_NO_EXPORT_SYMBOL) +-# define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */ + # include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) ++# define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */ ++#endif + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + # include + # else diff --git a/virtualbox.changes b/virtualbox.changes index 1fd200c..68c33fd 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 17 19:26:11 UTC 2021 - Larry Finger + +- Fix builds for Kernel 5.16. File "fixes-for-5.16.patch" is added. + Reorder some of the patch numbers. + ------------------------------------------------------------------- Wed Oct 20 05:48:42 UTC 2021 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index f66c710..eebd90f 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -174,13 +174,14 @@ Patch135: fix-missing-includes-with-qt-5.15.patch Patch136: fixes_for_gcc10.patch # Fix for changes in GSOAP 2.8.103 Patch137: handle_gsoap_208103.patch -# Fix for struct file_operations backport in 15.3 -Patch139: fixes_for_leap15.3.patch -Patch141: vb-6.1.16-modal-dialog-parent.patch # Fixes for kernel 5.14 -Patch142: fixes_for_5.14.patch +Patch138: fixes_for_5.14.patch +Patch139: fixes-for-5.15.patch +Patch140: fixes-for-5.16.patch +# Fix for struct file_operations backport in 15.3 +Patch142: fixes_for_leap15.3.patch +Patch143: vb-6.1.16-modal-dialog-parent.patch Patch144: fixes_for_leap15.4.patch -Patch145: fixes-for-5.15.patch Patch999: virtualbox-fix-ui-background-color.patch # # Common BuildRequires for both virtualbox and virtualbox-kmp @@ -314,7 +315,13 @@ the terms of the GNU Public License (GPL). + + + + + ########################################## + %package qt Summary: Qt GUI part for %{name} Group: System/Emulators/PC @@ -342,7 +349,13 @@ This package contains the code for the GUI used to control VMs. + + + + + ######################################### + %package websrv Summary: WebService GUI part for %{name} Group: System/Emulators/PC @@ -364,7 +377,13 @@ The VirtualBox web server is used to control headless VMs using a browser. + + + + + ######################################### + %package guest-x11 Summary: VirtualBox X11 drivers for mouse and video Group: System/X11/Servers/XF86_4 @@ -388,7 +407,13 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers + + + + + ########################################### + %package guest-tools Summary: VirtualBox guest tools Group: System/Emulators/PC @@ -417,7 +442,13 @@ VirtualBox guest addition tools. + + + + + ########################################### + %package -n python3-%{name} Summary: Python bindings for %{name} Group: Development/Libraries/Python @@ -446,7 +477,13 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package. + + + + + ########################################### + %package devel Summary: Devel files for %{name} Group: Development/Libraries/Other @@ -470,7 +507,13 @@ Development file for %{name} + + + + + ########################################### + %package host-source Summary: Source files for %{name} host kernel modules Group: Development/Sources @@ -512,7 +555,13 @@ sudo /usr/sbin/vboxguestconfig + + + + + ########################################### + %package guest-desktop-icons Summary: Icons for guest desktop files Group: System/Emulators/PC @@ -535,7 +584,13 @@ This package contains icons for guest desktop files that were created on the des + + + + + ########################################### + %package vnc Summary: VNC desktop sharing Group: System/Emulators/PC @@ -602,17 +657,18 @@ This package contains the kernel-modules that VirtualBox uses to create or run v %patch135 -p1 %patch136 -p1 %patch137 -p1 +%patch138 -p1 +%patch139 -p1 +%patch140 -p1 %if 0%{?sle_version} == 150300 && 0%{?is_opensuse} # Patch for Leap 15.3 -%patch139 -p1 -%endif -%patch141 -p1 %patch142 -p1 +%endif %if 0%{?sle_version} == 1504 && 0%{?is_opensuse} # Patch for Leap 15.4 %patch144 -p1 %endif -%patch145 -p1 +%patch143 -p1 # make VB UI background colors look sane again %patch999 -p1