git: c35a71080172 - main - emulators/virtualbox-ose: fix builds on CURRENT

From: Graham Perrin <grahamperrin_at_FreeBSD.org>
Date: Mon, 19 Dec 2022 21:34:16 UTC
The branch main has been updated by grahamperrin (doc committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=c35a710801728ab8ed3b2639a9a89f890f6acc29

commit c35a710801728ab8ed3b2639a9a89f890f6acc29
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-12-19 21:30:08 +0000
Commit:     Graham Perrin <grahamperrin@FreeBSD.org>
CommitDate: 2022-12-19 21:30:08 +0000

    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
---
 .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c     | 2 ++
 .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
index a191d66946cf..dc1027d4196b 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
@@ -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
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
index a1a69874a29e..6273c7b74084 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
@@ -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