Bug 290740

Summary: id(1): fix build failure when building without audit
Product: Base System Reporter: Sulev-Madis Silber <bugs-freebsd-org916>
Component: binAssignee: Dag-Erling Smørgrav <des>
Status: Closed FIXED    
Severity: Affects Many People CC: des, dmitryluhtionov, iron.udjin, jakub_lach, rozhuk.im
Priority: --- Flags: des: mfc-stable15+
des: mfc-stable14+
Version: 16.0-CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290781
Attachments:
Description Flags
fix for build without audit
none
short context patch none

Description Sulev-Madis Silber 2025-11-02 11:11:55 UTC
Created attachment 265100 [details]
fix for build without audit

recent change doesn't build without audit due missing ifdefs for aflags

here's the fix
Comment 1 Sulev-Madis Silber 2025-11-02 11:25:27 UTC
Created attachment 265103 [details]
short context patch
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-11-02 13:50:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=92a533ed1d3c81a772815f90cc9aff9237a4429c

commit 92a533ed1d3c81a772815f90cc9aff9237a4429c
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-11-02 13:45:12 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-02 13:48:12 +0000

    id: Fix WITHOUT_AUDIT build

    Rather than add more ifdefs, trust the compiler to optimize Aflag away.

    Fixes:          70b72ede982f ("id: Clean up")
    PR:             290740
    MFC after:      3 days

 usr.bin/id/id.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
Comment 3 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2025-11-03 08:59:24 UTC
*** Bug 290762 has been marked as a duplicate of this bug. ***
Comment 4 Ed Maste freebsd_committer freebsd_triage 2025-11-04 11:18:08 UTC
*** Bug 290781 has been marked as a duplicate of this bug. ***
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2025-11-04 11:36:33 UTC
*** Bug 290787 has been marked as a duplicate of this bug. ***
Comment 6 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2025-11-04 15:18:46 UTC
*** Bug 290790 has been marked as a duplicate of this bug. ***
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-11-04 15:30:01 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=05a3f80efe91b2cb9856ffd6c4a68d06117da824

commit 05a3f80efe91b2cb9856ffd6c4a68d06117da824
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-11-02 13:45:12 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-04 15:29:19 +0000

    id: Fix WITHOUT_AUDIT build

    Rather than add more ifdefs, trust the compiler to optimize Aflag away.

    Fixes:          70b72ede982f ("id: Clean up")
    PR:             290740
    MFC after:      3 days

    (cherry picked from commit 92a533ed1d3c81a772815f90cc9aff9237a4429c)

 usr.bin/id/id.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-11-04 15:30:03 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=c64b594a306480b567ed7132947459af9cc6aec5

commit c64b594a306480b567ed7132947459af9cc6aec5
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-11-02 13:45:12 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-04 15:29:38 +0000

    id: Fix WITHOUT_AUDIT build

    Rather than add more ifdefs, trust the compiler to optimize Aflag away.

    Fixes:          70b72ede982f ("id: Clean up")
    PR:             290740
    MFC after:      3 days

    (cherry picked from commit 92a533ed1d3c81a772815f90cc9aff9237a4429c)

 usr.bin/id/id.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-11-05 19:38:50 UTC
A commit in branch releng/15.0 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=290b9b6b262bfbc5559d638ef88b83fd27ebd385

commit 290b9b6b262bfbc5559d638ef88b83fd27ebd385
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-11-02 13:45:12 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-05 19:36:35 +0000

    id: Fix WITHOUT_AUDIT build

    Rather than add more ifdefs, trust the compiler to optimize Aflag away.

    Approved by:    re (cperciva)
    Fixes:          70b72ede982f ("id: Clean up")
    PR:             290740
    MFC after:      3 days

    (cherry picked from commit 92a533ed1d3c81a772815f90cc9aff9237a4429c)
    (cherry picked from commit 05a3f80efe91b2cb9856ffd6c4a68d06117da824)

 usr.bin/id/id.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)