Thanks for the info. I tried it and was able easily to build
...
with which I was able to carry on building VirtualBox 5.1.30 much further. It stopped eventually:
..
Build: Compiling ServicesR0 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/Devices/Network/SrvIntNetR0.cpp
kBuild: Compiling ServicesR0 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/Devices/Bus/SrvPciRawR0.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPLib.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPLibSem.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPLibTracerA.asm
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPLibAll.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
kBuild: Compiling SUPR3 - /home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
kmk: *** No rule to make target `/home/xci/Projects/VirtualBox-5.1.30/src/VBox/HostDrivers/Support/netbsd/SUPLib-netbsd.cpp', needed by `/home/xci/Projects/VirtualBox-5.1.30/out/netbsd.amd64/release/obj/SUPR3/netbsd/SUPLib-netbsd.o'. Stop.
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
...
but no netbsd. As far as I understand it, the freebsd folder contains the source of a kernel module vboxdrv...