aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Druzenko <vvd@FreeBSD.org>2023-05-23 18:10:50 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2023-05-23 18:24:21 +0000
commita39a00bddf995d665bb4ba4e89d7403d14060a6f (patch)
treeef0398e6532638c57c2cebeeb6a0130404a0d901
parent922f645e558feab85df7b1dbe96cf90a1aeae243 (diff)
downloadports-a39a00bddf995d665bb4ba4e89d7403d14060a6f.tar.gz
ports-a39a00bddf995d665bb4ba4e89d7403d14060a6f.zip
emulators/virtualbox-ose: error: use of undeclared identifier 'mempcpy'
1. There are no mempcpy on 12, on 13 before 1300513 and on 14 before 1400026. Log with error is here: https://lists.freebsd.org/archives/freebsd-pkg-fallout/2023-May/402233.html 2. 12 have llvm11 in base after 1203502 (llvm12 after 1203503 and llvm13 after 1203505), so not need to force build with llvm11 from ports. Reported by: https://portsfallout.com/fallout?port=emulators%2Fvirtualbox-ose%24 Reviewed by: rene Approved by: arrowd (mentor), fuz Differential Revision: https://reviews.freebsd.org/D40163
-rw-r--r--emulators/virtualbox-ose/Makefile8
-rw-r--r--emulators/virtualbox-ose/files/extrapatch-src_VBox_Devices_PC_DevFwCommon.cpp14
2 files changed, 21 insertions, 1 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index 82c5fc047dd6..cda9d742e9eb 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -211,10 +211,16 @@ KMK_FLAGS+= -j${MAKE_JOBS_NUMBER}
.include <bsd.port.pre.mk>
+.if ${OPSYS} == FreeBSD && \
+ (${OSVERSION} < 1300513 || ${OSVERSION} >= 1400000 && ${OSVERSION} < 1400026)
+EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src_VBox_Devices_PC_DevFwCommon.cpp
+.endif
+
.if ${CHOSEN_COMPILER_TYPE} == clang
# llvm10 in FreeBSD before r364284 miscompiles virtualbox 6.1 causing errors.
# force llvm11 from ports
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300109
+.if ${OPSYS} == FreeBSD && \
+ (${OSVERSION} < 1203502 || ${OSVERSION} >= 1300000 && ${OSVERSION} < 1300109)
BUILD_DEPENDS+= clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER}
CC= clang${VBOX_LLVM_VER}
CXX= clang++${VBOX_LLVM_VER}
diff --git a/emulators/virtualbox-ose/files/extrapatch-src_VBox_Devices_PC_DevFwCommon.cpp b/emulators/virtualbox-ose/files/extrapatch-src_VBox_Devices_PC_DevFwCommon.cpp
new file mode 100644
index 000000000000..2ee34f889bb6
--- /dev/null
+++ b/emulators/virtualbox-ose/files/extrapatch-src_VBox_Devices_PC_DevFwCommon.cpp
@@ -0,0 +1,14 @@
+--- src/VBox/Devices/PC/DevFwCommon.cpp.orig
++++ src/VBox/Devices/PC/DevFwCommon.cpp
+@@ -40,6 +40,11 @@
+ #include "VBoxDD2.h"
+ #include "DevFwCommon.h"
+
++static inline void *
++mempcpy(void *__restrict dst, const void *__restrict src, size_t len)
++{
++ return ((char *)memcpy(dst, src, len) + len);
++}
+
+ /*********************************************************************************************************************************
+ * Defined Constants And Macros *