diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-09-24 21:31:13 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-09-24 21:56:02 +0200 |
commit | c6d0023b9e4aaab23038adb446310c74df4ebc45 (patch) | |
tree | 1fa359aaaa3f62fc0fe3bd1a23a251420934bcf4 /app-emulation/virtualbox-modules | |
parent | net-vpn/openconnect: bump to 8.05 (diff) | |
download | gentoo-c6d0023b9e4aaab23038adb446310c74df4ebc45.tar.gz gentoo-c6d0023b9e4aaab23038adb446310c74df4ebc45.tar.bz2 gentoo-c6d0023b9e4aaab23038adb446310c74df4ebc45.zip |
app-emulation/virtualbox-modules: add linux-5.3+ compatibility
Closes: https://bugs.gentoo.org/694560
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'app-emulation/virtualbox-modules')
-rw-r--r-- | app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch | 76 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-6.0.12.ebuild | 2 |
2 files changed, 78 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch new file mode 100644 index 000000000000..ff573dd69b67 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch @@ -0,0 +1,76 @@ +https://bugs.gentoo.org/694560 + +https://www.virtualbox.org/ticket/18911#comment:5 + +--- a/vboxnetflt//linux/VBoxNetFlt-linux.c ++++ b/vboxnetflt//linux/VBoxNetFlt-linux.c +@@ -2123,7 +2123,9 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign + #endif + if (in_dev != NULL) + { +- for_ifa(in_dev) { ++ struct in_ifaddr *ifa; ++ ++ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { + if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address)) + return NOTIFY_OK; + +@@ -2137,7 +2139,7 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign + + pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, + /* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address); +- } endfor_ifa(in_dev); ++ } + } + + /* +--- a/vboxdrv/r0drv/linux/mp-r0drv-linux.c ++++ b/vboxdrv/r0drv/linux/mp-r0drv-linux.c +@@ -283,12 +283,15 @@ RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) + if (RTCpuSetCount(&OnlineSet) > 1) + { + /* Fire the function on all other CPUs without waiting for completion. */ +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) ++ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */); ++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */); ++ Assert(!rc); NOREF(rc); + # else + int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */); +-# endif + Assert(!rc); NOREF(rc); ++# endif + } + #endif + +@@ -326,7 +329,6 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) + { + #ifdef CONFIG_SMP + IPRT_LINUX_SAVE_EFL_AC(); +- int rc; + RTMPARGS Args; + + RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; +@@ -337,14 +339,17 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) + Args.cHits = 0; + + RTThreadPreemptDisable(&PreemptState); +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) +- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) ++ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); ++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); ++ Assert(rc == 0); NOREF(rc); + # else /* older kernels */ +- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */); ++ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */); ++ Assert(rc == 0); NOREF(rc); + # endif /* older kernels */ + RTThreadPreemptRestore(&PreemptState); + +- Assert(rc == 0); NOREF(rc); + IPRT_LINUX_RESTORE_EFL_AC(); + #else + RT_NOREF(pfnWorker, pvUser1, pvUser2); diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.12.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.12.ebuild index 7257cb3b5812..90528f502491 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.12.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.12.ebuild @@ -21,6 +21,8 @@ IUSE="pax_kernel" RDEPEND="!=app-emulation/virtualbox-9999" +PATCHES=( "${FILESDIR}"/${PN}-6.0.12-linux-5.3+-compatibility.patch ) + S="${WORKDIR}" BUILD_TARGETS="all" |