Index: VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +++ VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c @@ -89,6 +89,13 @@ #define VBOXNETFLT_OS_SPECFIC 1 #include "../VBoxNetFltInternal.h" +# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 2 +# define OPENSUSE_152 +# endif +# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 5 +# define OPENSUSE_155 +# endif + typedef struct VBOXNETFLTNOTIFIER { struct notifier_block Notifier; PVBOXNETFLTINS pThis; Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_drv.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_drv.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_drv.c @@ -39,6 +39,7 @@ #include "vbox_drv.h" #include + #if RTLNX_VER_MIN(5,1,0) || RTLNX_RHEL_MAJ_PREREQ(8,1) # include #endif @@ -52,7 +53,7 @@ /** Detect whether kernel mode setting is OFF. */ #if defined(CONFIG_VGA_CONSOLE) -# if RTLNX_VER_MIN(5,17,0) || RTLNX_RHEL_RANGE(8,7, 8,99) || RTLNX_RHEL_MIN(9,1) +# if RTLNX_VER_MIN(5,17,0) || RTLNX_RHEL_RANGE(8,7, 8,99) || RTLNX_RHEL_MIN(9,1) || RTLNX_SUSE_MAJ_PREREQ(15,5) # define VBOX_VIDEO_NOMODESET() drm_firmware_drivers_only() && vbox_modeset == -1 # elif RTLNX_VER_MIN(4,7,0) # define VBOX_VIDEO_NOMODESET() vgacon_text_force() && vbox_modeset == -1 @@ -342,12 +343,15 @@ static void vbox_master_drop(struct drm_ } static struct drm_driver driver = { -#if RTLNX_VER_MAX(5,4,0) && !RTLNX_RHEL_MAJ_PREREQ(8,3) && !RTLNX_SUSE_MAJ_PREREQ(15,3) - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | +#if RTLNX_VER_MAX(5,4,0) + .driver_features = +#if defined(OPENSUSE_152) + DRIVER_PRIME | +#endif # if RTLNX_VER_MAX(5,1,0) && !RTLNX_RHEL_MAJ_PREREQ(8,1) DRIVER_IRQ_SHARED | # endif - DRIVER_PRIME, + DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, #else /* >= 5.4.0 && RHEL >= 8.3 && SLES >= 15-SP3 */ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, #endif /* < 5.4.0 */ @@ -369,7 +373,7 @@ static struct drm_driver driver = { #endif .fops = &vbox_fops, -#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_RANGE(8,7, 8,99) && !RTLNX_RHEL_MAJ_PREREQ(9,1) +#if !RTLNX_SUSE_MAJ_PREREQ(15,5) && RTLNX_VER_MAX(5,19,0) .irq_handler = vbox_irq_handler, #endif .name = DRIVER_NAME, Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_main.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_main.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_main.c @@ -663,8 +663,12 @@ static inline u64 vbox_bo_mmap_offset(st #elif RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,0) return bo->bo.addr_space_offset; #else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) + return drm_vma_node_offset_addr(&bo->bo.base.vma_node); +#else return drm_vma_node_offset_addr(&bo->bo.vma_node); #endif /* >= 5.4.0 */ +#endif } int Index: VirtualBox-7.0.10/include/iprt/cdefs.h =================================================================== --- VirtualBox-7.0.10.orig/include/iprt/cdefs.h +++ VirtualBox-7.0.10/include/iprt/cdefs.h @@ -1399,14 +1399,15 @@ #if RT_CLANG_PREREQ(4, 0) && RT_CPLUSPLUS_PREREQ(201100) # define RT_FALL_THROUGH() [[clang::fallthrough]] #elif RT_CLANG_PREREQ(12, 0) || RT_GNUC_PREREQ(7, 0) -# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) +# define FALL_THROUGH __attribute__((__fallthrough__)) #else -# define RT_FALL_THROUGH() (void)0 +# define FALL_THROUGH (void)0 #endif /** @def RT_FALL_THRU * Tell the compiler that we're falling thru to the next case in a switch. * @sa RT_FALL_THROUGH */ -#define RT_FALL_THRU() RT_FALL_THROUGH() +#define RT_FALL_THRU() FALL_THROUGH +#define RT_FALL_THROUGH() FALL_THROUGH /** @def RT_IPRT_FORMAT_ATTR Index: VirtualBox-7.0.10/kBuild/header.kmk =================================================================== --- VirtualBox-7.0.10.orig/kBuild/header.kmk +++ VirtualBox-7.0.10/kBuild/header.kmk @@ -764,7 +764,7 @@ RMDIR_EXT := $(KBUILD_BIN_PATH)/kmk_rm RMDIR_INT := kmk_builtin_rmdir RMDIR := $(RMDIR_INT) -SED_EXT := $(KBUILD_BIN_PATH)/kmk_sed$(HOSTSUFF_EXE) +SED_EXT := /usr/bin/kmk_sed$(HOSTSUFF_EXE) SED_INT := $(SED_EXT) SED := $(SED_EXT) Index: VirtualBox-7.0.10/configure =================================================================== --- VirtualBox-7.0.10.orig/configure +++ VirtualBox-7.0.10/configure @@ -2041,7 +2041,7 @@ check_kbuild() fi echo "export KBUILD_PATH KBUILD_DEVTOOLS PATH" >> $ENV echo "unset path_kbuild_bin path_tools_bin" >> $ENV - KBUILD_SED="$KBUILDDIR_BIN/kmk_sed" + KBUILD_SED="/usr/bin/kmk_sed" echo '' >> $ENV echo "# Legacy - do not use:" >> $ENV @@ -2051,7 +2051,7 @@ check_kbuild() echo '' >> $ENV elif check_avail "kmk" KBUILDDIR really; then # check for installed kBuild - KBUILD_SED="`which_wrapper kmk_sed`" + KBUILD_SED="/usr/bin/kmk_sed" else fail fi Index: VirtualBox-7.0.10/tools/bin/backport-commit.sh =================================================================== --- VirtualBox-7.0.10.orig/tools/bin/backport-commit.sh +++ VirtualBox-7.0.10/tools/bin/backport-commit.sh @@ -29,7 +29,7 @@ # # Determin script dir so we can source the common bits. # -MY_SED=kmk_sed +MY_SED=/usr/bin/kmk_sed MY_SCRIPT_DIR=`echo "$0" | "${MY_SED}" -e 's|\\\|/|g' -e 's|^\(.*\)/[^/][^/]*$|\1|'` # \ -> / is for windows. if test "${MY_SCRIPT_DIR}" = "$0"; then MY_SCRIPT_DIR=`pwd -L` Index: VirtualBox-7.0.10/tools/bin/backport-common.sh =================================================================== --- VirtualBox-7.0.10.orig/tools/bin/backport-common.sh +++ VirtualBox-7.0.10/tools/bin/backport-common.sh @@ -1,4 +1,4 @@ -# $Id: backport-common.sh $ + $Id: backport-common.sh $ ## @file # Common backport script bits. # @@ -33,7 +33,7 @@ MY_PRINTF=kmk_printf MY_RM=kmk_rm MY_SVN=svn - MY_SED=kmk_sed + MY_SED=/usr/bin/kmk_sed # # Functions. Index: VirtualBox-7.0.10/tools/bin/backport-merge-and-commit.sh =================================================================== --- VirtualBox-7.0.10.orig/tools/bin/backport-merge-and-commit.sh +++ VirtualBox-7.0.10/tools/bin/backport-merge-and-commit.sh @@ -29,7 +29,7 @@ # # Determin script dir so we can invoke the two worker scripts. # -MY_SED=kmk_sed +MY_SED=/usr/bin/kmk_sed MY_SCRIPT_DIR=`echo "$0" | "${MY_SED}" -e 's|\\\|/|g' -e 's|^\(.*\)/[^/][^/]*$|\1|'` # \ -> / is for windows. if test "${MY_SCRIPT_DIR}" = "$0"; then MY_SCRIPT_DIR=`pwd -L` Index: VirtualBox-7.0.10/tools/bin/backport-merge.sh =================================================================== --- VirtualBox-7.0.10.orig/tools/bin/backport-merge.sh +++ VirtualBox-7.0.10/tools/bin/backport-merge.sh @@ -29,7 +29,7 @@ # # Determin script dir so we can source the common bits. # -MY_SED=kmk_sed +MY_SED=/usr/bin/kmk_sed MY_SCRIPT_DIR=`echo "$0" | "${MY_SED}" -e 's|\\\|/|g' -e 's|^\(.*\)/[^/][^/]*$|\1|'` # \ -> / is for windows. if test "${MY_SCRIPT_DIR}" = "$0"; then MY_SCRIPT_DIR=`pwd -L` Index: VirtualBox-7.0.10/src/VBox/Main/Makefile.kmk =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Main/Makefile.kmk +++ VirtualBox-7.0.10/src/VBox/Main/Makefile.kmk @@ -264,7 +264,7 @@ $(VBOX_XIDL_FILE).ts +| $(VBOX_XIDL_FILE | $$(dir $$@) $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) $(QUIET)$(VBOX_XSLTPROC) -o $(VBOX_XIDL_FILE).ts-tmp $(VBOX_PATH_MAIN_SRC)/idl/docstrip.xsl $(VBOX_XIDL_FILE_SRC) - $(QUIET)$(SED) -e 's/ *$(DOLLAR)//g' -e '/^$(DOLLAR)/d' --output $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE).ts-tmp + /usr/bin/kmk_sed -e 's/ *$(DOLLAR)//g' -e '/^$(DOLLAR)/d' --output $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE).ts-tmp $(QUIET)$(RM) -- $(VBOX_XIDL_FILE).ts-tmp $(QUIET)$(CP) --changed -fv -- $(VBOX_XIDL_FILE).ts $(VBOX_XIDL_FILE) Index: VirtualBox-7.0.10/src/VBox/Runtime/Makefile.kmk =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Runtime/Makefile.kmk +++ VirtualBox-7.0.10/src/VBox/Runtime/Makefile.kmk @@ -4421,6 +4421,7 @@ $(foreach lib,RuntimeR3 RuntimeBldProg V # # Generate the status code data. # +SED = "/usr/bin/kmk_sed" $(IPRT_OUT_DIR)/errmsgdata.h: \ $(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \ $(PATH_ROOT)/include/iprt/err.h \ Index: VirtualBox-7.0.10/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +++ VirtualBox-7.0.10/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h @@ -147,9 +147,9 @@ #include #include #include -#if RTLNX_VER_MIN(5,9,0) || RTLNX_SUSE_MAJ_PREREQ(15,3) /* linux/fs.h defined HAVE_UNLOCKED_IOCTL from 2.6.11 up to 5.9 (also 5.3.18-56 in SLES15-SP3), when it became an implicit assumption. */ +//#if RTLNX_VER_MIN(5,9,0) || RTLNX_SUSE_MAJ_PREREQ(15,3) /* linux/fs.h defined HAVE_UNLOCKED_IOCTL from 2.6.11 up to 5.9 (also 5.3.18-56 in SLES15-SP3), when it became an implicit assumption. */ # define HAVE_UNLOCKED_IOCTL 1 /* We use this in a couple of places, so for now just define it for 5.9+ too. */ -#endif +//#endif #if !defined(HAVE_UNLOCKED_IOCTL) && RTLNX_VER_MAX(2,6,38) # include #endif Index: VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyXPCOM.h =================================================================== --- VirtualBox-7.0.10.orig/src/libs/xpcom18a4/python/src/PyXPCOM.h +++ VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyXPCOM.h @@ -191,7 +191,7 @@ extern "C" PyAPI_FUNC(const char *) PyUn # endif /* PyUnicode_AsUTF8 is just PyUnicode_AsUTF8AndSize without returning a size. */ -# define PyUnicode_AsUTF8(o) PyUnicode_AsUTF8AndSize(o, NULL) +// # define PyUnicode_AsUTF8(o) (const char *)PyUnicode_AsUTF8AndSize(o, NULL) DECLINLINE(int) PyRun_SimpleString(const char *pszCode) { Index: VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp =================================================================== --- VirtualBox-7.0.10.orig/src/libs/xpcom18a4/python/src/ErrorUtils.cpp +++ VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/ErrorUtils.cpp @@ -121,7 +121,7 @@ void DoLogMessage(const char *methodName #if PY_MAJOR_VERSION <= 2 c += PyString_AsString(repr); #else - c += PyUnicode_AsUTF8(repr); + c += PyUnicode_AsUTF8AndSize(repr, NULL); #endif Py_DECREF(repr); } @@ -203,7 +203,7 @@ PRBool PyXPCOM_FormatGivenException(nsCS #if PY_MAJOR_VERSION <= 2 streamout += PyString_AsString(temp); #else - streamout += PyUnicode_AsUTF8(temp); + streamout += PyUnicode_AsUTF8AndSize(temp, NULL); #endif Py_DECREF(temp); } else @@ -215,7 +215,7 @@ PRBool PyXPCOM_FormatGivenException(nsCS #if PY_MAJOR_VERSION <= 2 streamout += PyString_AsString(temp); #else - streamout += PyUnicode_AsUTF8(temp); + streamout += PyUnicode_AsUTF8AndSize(temp, NULL); #endif Py_DECREF(temp); } else @@ -440,10 +440,10 @@ char *PyTraceback_AsString(PyObject *exc #if PY_MAJOR_VERSION <= 2 char *tempResult = (char *)PyString_AsString(obResult); #elif PY_MINOR_VERSION <= 6 - char *tempResult = (char *)PyUnicode_AsUTF8(obResult); + char *tempResult = (char *)PyUnicode_AsUTF8AndSize(obResult, NULL); #else /* PyUnicode_AsUTF8() is const char * as of Python 3.7, char * earlier. */ - const char *tempResult = (const char *)PyUnicode_AsUTF8(obResult); + const char *tempResult = (const char *)PyUnicode_AsUTF8AndSize(obResult, NULL); #endif result = (char *)PyMem_Malloc(strlen(tempResult)+1); if (result==NULL) Index: VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyGBase.cpp =================================================================== --- VirtualBox-7.0.10.orig/src/libs/xpcom18a4/python/src/PyGBase.cpp +++ VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyGBase.cpp @@ -117,7 +117,7 @@ PyG_Base::PyG_Base(PyObject *instance, c #if PY_MAJOR_VERSION <= 2 szRepr = PyString_AsString(r); #else - szRepr = PyUnicode_AsUTF8(r); + szRepr = PyUnicode_AsUTF8AndSize(r, NULL); #endif if (szRepr==NULL) szRepr = ""; int reprOffset = *szRepr=='<' ? 1 : 0; Index: VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyIID.cpp =================================================================== --- VirtualBox-7.0.10.orig/src/libs/xpcom18a4/python/src/PyIID.cpp +++ VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/PyIID.cpp @@ -137,7 +137,7 @@ Py_nsIID::IIDFromPyObject(PyObject *ob, ok = iid.Parse(PyString_AsString(ob)); #else if (PyUnicode_Check(ob)) { - ok = iid.Parse(PyUnicode_AsUTF8(ob)); + ok = iid.Parse(PyUnicode_AsUTF8AndSize(ob, NULL)); #endif if (!ok) { PyXPCOM_BuildPyException(NS_ERROR_ILLEGAL_VALUE); Index: VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/VariantUtils.cpp =================================================================== --- VirtualBox-7.0.10.orig/src/libs/xpcom18a4/python/src/VariantUtils.cpp +++ VirtualBox-7.0.10/src/libs/xpcom18a4/python/src/VariantUtils.cpp @@ -141,7 +141,7 @@ PyObject *PyObject_FromNSString( const n #if PY_MAJOR_VERSION <= 2 char* dest = (char *)PyString_AS_STRING(ret); #else - char* dest = (char *)PyUnicode_AsUTF8(ret); + char* dest = (char *)PyUnicode_AsUTF8AndSize(ret, NULL); #endif copy_string(s.BeginReading(fromBegin), s.EndReading(fromEnd), dest); } @@ -393,7 +393,7 @@ PRBool FillSingleArray(void *array_ptr, #if PY_MAJOR_VERSION <= 2 sequence_ob = PyObject_Str(sequence_ob); #else - sequence_ob = PyUnicode_AsUTF8String(sequence_ob); + sequence_ob = (PyObject *)PyUnicode_AsUTF8AndSize(sequence_ob, NULL); #endif } else release_seq = PR_FALSE; @@ -402,7 +402,7 @@ PRBool FillSingleArray(void *array_ptr, #if PY_MAJOR_VERSION <= 2 memcpy(pthis, PyString_AS_STRING(sequence_ob), sequence_size); #else - memcpy(pthis, PyUnicode_AsUTF8(sequence_ob), sequence_size); + memcpy(pthis, PyUnicode_AsUTF8AndSize(sequence_ob, NULL), sequence_size); #endif if (release_seq) { @@ -477,7 +477,7 @@ PRBool FillSingleArray(void *array_ptr, PyErr_SetString(PyExc_TypeError, "This parameter must be a unicode object"); BREAK_FALSE; } - FILL_SIMPLE_POINTER( char, *PyUnicode_AsUTF8(val) ); + FILL_SIMPLE_POINTER( char, *PyUnicode_AsUTF8AndSize(val, NULL) ); #endif break; @@ -549,7 +549,7 @@ PRBool FillSingleArray(void *array_ptr, PyErr_SetString(PyExc_TypeError, "This parameter must be a unicode object"); BREAK_FALSE; } - if ((val_use = PyUnicode_AsUTF8String(val))==NULL) + if ((val_use = (PyObject *)PyUnicode_AsUTF8AndSize(val, NULL))==NULL) BREAK_FALSE; const char *sz = PyBytes_AS_STRING(val_use); Index: VirtualBox-7.0.10/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp +++ VirtualBox-7.0.10/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp @@ -710,7 +710,7 @@ static const char *keyModToStr(unsigned RT_CASE_RET_STR(KMOD_NUM); RT_CASE_RET_STR(KMOD_CAPS); RT_CASE_RET_STR(KMOD_MODE); - RT_CASE_RET_STR(KMOD_SCROLL); + RT_CASE_RET_STR(KMOD_RESERVED); default: break; } Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_drv.h =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_drv.h +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_drv.h @@ -39,6 +39,7 @@ # pragma once #endif + #include /* iprt/linux/version.h copy - start */ @@ -160,9 +161,9 @@ # include # include # include -# if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_RANGE(8,7, 8,99) && !RTLNX_RHEL_MAJ_PREREQ(9,1) -# include -# endif +//# if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_RANGE(8,7, 8,99) && !RTLNX_RHEL_MAJ_PREREQ(9,1) +//# include +//# endif # include #else /* < 5.5.0 || RHEL < 8.3 || SLES < 15-SP3 */ # include @@ -192,15 +193,15 @@ # include #endif -#if RTLNX_VER_MIN(6,0,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) +#if RTLNX_VER_MIN(5,14,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) # include -#endif #include "vboxvideo_guest.h" #include "vboxvideo_vbe.h" #include "hgsmi_ch_setup.h" #include "product-generated.h" +#endif #if RTLNX_VER_MAX(4,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,5) static inline void drm_gem_object_put_unlocked(struct drm_gem_object *obj) Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_irq.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_irq.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_irq.c @@ -205,21 +205,11 @@ int vbox_irq_init(struct vbox_private *v { INIT_WORK(&vbox->hotplug_work, vbox_hotplug_worker); vbox_update_mode_hints(vbox); -#if RTLNX_VER_MIN(5,15,0) || RTLNX_RHEL_RANGE(8,7, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,1) return request_irq(VBOX_DRM_TO_PCI_DEV(vbox->dev)->irq, vbox_irq_handler, IRQF_SHARED, vbox->dev->driver->name, vbox->dev); -#elif RTLNX_VER_MIN(3,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,1) - return drm_irq_install(vbox->dev, VBOX_DRM_TO_PCI_DEV(vbox->dev)->irq); -#else - return drm_irq_install(vbox->dev); -#endif } void vbox_irq_fini(struct vbox_private *vbox) { -#if RTLNX_VER_MIN(5,15,0) || RTLNX_RHEL_RANGE(8,7, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,1) free_irq(VBOX_DRM_TO_PCI_DEV(vbox->dev)->irq, vbox->dev); -#else - drm_irq_uninstall(vbox->dev); -#endif flush_work(&vbox->hotplug_work); } Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_ttm.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_ttm.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_ttm.c @@ -38,6 +38,10 @@ # include #endif +# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 5 +# define OPENSUSE_155 +# endif + #if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_MAJ_PREREQ(8,5) # include # include @@ -321,7 +325,7 @@ static struct ttm_tt *vbox_ttm_tt_create #if RTLNX_VER_MAX(5,10,0) && !RTLNX_RHEL_RANGE(8,5, 8,99) tt->func = &vbox_tt_backend_func; #endif -#if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) +#if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) || defined(OPENSUSE_155) if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined, 0)) { #elif RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99) if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined)) { @@ -330,11 +334,9 @@ static struct ttm_tt *vbox_ttm_tt_create #else if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) { #endif - kfree(tt); return NULL; } - return tt; } @@ -628,7 +630,7 @@ int vbox_bo_create(struct drm_device *de drm_vma_node_reset(&vboxbo->bo.base.vma_node); #endif -#if RTLNX_VER_MIN(6,1,0) +#if RTLNX_VER_MIN(6,1,0) || defined(OPENSUSE_155) ret = ttm_bo_init_validate(&vbox->ttm.bdev, &vboxbo->bo, #else ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size, Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_fb.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_fb.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_fb.c @@ -47,6 +47,7 @@ #include #include #include +#include #include Index: VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_mode.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/Additions/linux/drm/vbox_mode.c +++ VirtualBox-7.0.10/src/VBox/Additions/linux/drm/vbox_mode.c @@ -39,10 +39,8 @@ #include "vbox_drv.h" #include #include -#if RTLNX_VER_MIN(6,3,0) # include # include -#endif #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2) # include #endif @@ -53,6 +51,7 @@ #if RTLNX_VER_MIN(6,0,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) # include #endif +#include #include "VBoxVideo.h" Index: VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c =================================================================== --- VirtualBox-7.0.10.orig/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c +++ VirtualBox-7.0.10/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c @@ -77,7 +77,7 @@ #define VBOXNETADP_FROM_IFACE(iface) ((PVBOXNETADP) ifnet_softc(iface)) /** Set netdev MAC address. */ -#if RTLNX_VER_MIN(5,17,0) +#if RTLNX_VER_MIN(5,17,0) || RTLNX_SUSE_MAJ_PREREQ(15,5) # define VBOX_DEV_ADDR_SET(dev, addr, len) dev_addr_mod(dev, 0, addr, len) #else /* < 5.17.0 */ # define VBOX_DEV_ADDR_SET(dev, addr, len) memcpy(dev->dev_addr, addr, len)