summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Rękorajski2022-05-26 04:38:58 (GMT)
committerJan Rękorajski2022-05-26 04:38:58 (GMT)
commit8c2ca999284d38390b8a10627a87737c47e8ca0d (patch)
treed60455b37c24260adcee982346c66e3a7ac521a6
parentf9b01c8160f14a80d8f2e8fa9683c9d86e9fc600 (diff)
downloadVirtualBox-8c2ca999284d38390b8a10627a87737c47e8ca0d.zip
VirtualBox-8c2ca999284d38390b8a10627a87737c47e8ca0d.tar.gz
- fix building kernel modules for 5.18
-rw-r--r--VirtualBox.spec2
-rw-r--r--kernel-5.18.patch16
2 files changed, 18 insertions, 0 deletions
diff --git a/VirtualBox.spec b/VirtualBox.spec
index c8ea8ba..0708c40 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -89,6 +89,7 @@ Patch16: %{pname}-no-vboxvideo.patch
Patch17: qt5-gl.patch
Patch18: qt-detect.patch
Patch19: kernel-4.9.256.patch
+Patch20: kernel-5.18.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
@@ -574,6 +575,7 @@ tar -zxf guest-modules.tar.gz -C GuestDrivers
tar -zxf host-modules.tar.gz -C HostDrivers
cd -
%patch19 -p1
+%patch20 -p1
%endif
# using system kBuild package
diff --git a/kernel-5.18.patch b/kernel-5.18.patch
new file mode 100644
index 0000000..1adcf10
--- /dev/null
+++ b/kernel-5.18.patch
@@ -0,0 +1,16 @@
+--- VirtualBox-6.1.34/kernel/HostDrivers/vboxnetflt/linux/VBoxNetFlt-linux.c~ 2022-05-25 17:21:29.000000000 +0200
++++ VirtualBox-6.1.34/kernel/HostDrivers/vboxnetflt/linux/VBoxNetFlt-linux.c 2022-05-26 06:36:50.085761576 +0200
+@@ -2310,8 +2310,13 @@
+ {
+ vboxNetFltDumpPacket(pSG, true, "host", (fDst & INTNETTRUNKDIR_WIRE) ? 0 : 1);
+ Log6(("vboxNetFltPortOsXmit: pBuf->cb dump:\n%.*Rhxd\n", sizeof(pBuf->cb), pBuf->cb));
++#if RTLNX_VER_MIN(5,18,0)
++ Log6(("vboxNetFltPortOsXmit: netif_rx(%p)\n", pBuf));
++ err = netif_rx(pBuf);
++#else
+ Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));
+ err = netif_rx_ni(pBuf);
++#endif
+ if (err)
+ rc = RTErrConvertFromErrno(err);
+ }