Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, ...
Date: Tue, 24 Sep 2019 19:56:21
Message-Id: 1569354963.ca27b4f4319e1955f399c9766bbd9199a2a4c3a2.whissi@gentoo
1 commit: ca27b4f4319e1955f399c9766bbd9199a2a4c3a2
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 24 19:55:40 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 24 19:56:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca27b4f4
7
8 app-emulation/virtualbox-guest-additions: add linux-5.3+ compatibility
9
10 Closes: https://bugs.gentoo.org/694614
11 Package-Manager: Portage-2.3.76, Repoman-2.3.17
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 ...additions-6.0.12-linux-5.3+-compatibility.patch | 75 ++++++++++++++++++++++
15 .../virtualbox-guest-additions-6.0.12.ebuild | 4 ++
16 2 files changed, 79 insertions(+)
17
18 diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
19 new file mode 100644
20 index 00000000000..ad4b460c814
21 --- /dev/null
22 +++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
23 @@ -0,0 +1,75 @@
24 +https://bugs.gentoo.org/694614
25 +https://www.virtualbox.org/ticket/18911#comment:5
26 +
27 +--- a/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
28 ++++ b/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
29 +@@ -2123,7 +2123,9 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign
30 + #endif
31 + if (in_dev != NULL)
32 + {
33 +- for_ifa(in_dev) {
34 ++ struct in_ifaddr *ifa;
35 ++
36 ++ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
37 + if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address))
38 + return NOTIFY_OK;
39 +
40 +@@ -2137,7 +2139,7 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign
41 +
42 + pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
43 + /* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address);
44 +- } endfor_ifa(in_dev);
45 ++ }
46 + }
47 +
48 + /*
49 +--- a/Runtime/r0drv/linux/mp-r0drv-linux.c
50 ++++ b/Runtime/r0drv/linux/mp-r0drv-linux.c
51 +@@ -283,12 +283,15 @@ RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
52 + if (RTCpuSetCount(&OnlineSet) > 1)
53 + {
54 + /* Fire the function on all other CPUs without waiting for completion. */
55 +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
56 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
57 ++ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
58 ++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
59 + int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
60 ++ Assert(!rc); NOREF(rc);
61 + # else
62 + int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
63 +-# endif
64 + Assert(!rc); NOREF(rc);
65 ++# endif
66 + }
67 + #endif
68 +
69 +@@ -326,7 +329,6 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
70 + {
71 + #ifdef CONFIG_SMP
72 + IPRT_LINUX_SAVE_EFL_AC();
73 +- int rc;
74 + RTMPARGS Args;
75 +
76 + RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
77 +@@ -337,14 +339,17 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
78 + Args.cHits = 0;
79 +
80 + RTThreadPreemptDisable(&PreemptState);
81 +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
82 +- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
83 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
84 ++ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
85 ++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
86 ++ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
87 ++ Assert(rc == 0); NOREF(rc);
88 + # else /* older kernels */
89 +- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
90 ++ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
91 ++ Assert(rc == 0); NOREF(rc);
92 + # endif /* older kernels */
93 + RTThreadPreemptRestore(&PreemptState);
94 +
95 +- Assert(rc == 0); NOREF(rc);
96 + IPRT_LINUX_RESTORE_EFL_AC();
97 + #else
98 + RT_NOREF(pfnWorker, pvUser1, pvUser2);
99
100 diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
101 index efbf2bd2fdf..9ac2195b1e0 100644
102 --- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
103 +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
104 @@ -71,6 +71,10 @@ src_prepare() {
105 eend
106 popd &>/dev/null || die
107
108 + pushd src/VBox &>/dev/null || die
109 + eapply "${FILESDIR}"/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
110 + popd &>/dev/null || die
111 +
112 # PaX fixes (see bug #298988)
113 pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
114 eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch