emulators/virtualbox-ose: fix builds on CURRENT

SAVENAME was retired by D36542 https://reviews.freebsd.org/D36542

Bug 267079 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267079
involves failures to build four ports, for VirtualBox guest additions,
on FreeBSD-CURRENT:

    emulators/virtualbox-ose-additions
    emulators/virtualbox-ose-additions-legacy
    emulators/virtualbox-ose-additions-nox11
    emulators/virtualbox-ose-additions-nox11-legacy

Fix bug 267079 for CURRENT 1400068 and greater by hiding the use of
SAVENAME in patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
for:

    emulators/virtualbox-ose
    emulators/virtualbox-ose-legacy

PR:                  : 267079
Author:              : mjg
Approved by:         : ports-committers (lwhsu), khng
Differential revision: https://reviews.freebsd.org/D37074
This commit is contained in:
Mateusz Guzik 2022-12-19 21:30:08 +00:00 committed by Graham Perrin
parent 8bb0246791
commit c35a710801
2 changed files with 4 additions and 0 deletions

View File

@ -1413,9 +1413,11 @@
+ if (error != 0)
+ goto out;
+
+#if __FreeBSD_version < 1400068
+ /* Keep the component name in the buffer for
+ * future uses. */
+ cnp->cn_flags |= SAVENAME;
+#endif
+
+ error = EJUSTRETURN;
+ } else

View File

@ -1413,9 +1413,11 @@
+ if (error != 0)
+ goto out;
+
+#if __FreeBSD_version < 1400068
+ /* Keep the component name in the buffer for
+ * future uses. */
+ cnp->cn_flags |= SAVENAME;
+#endif
+
+ error = EJUSTRETURN;
+ } else