git: f54344ec12c8 - stable/14 - kern_racct.c: Don't compile if RACCT undefined
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Feb 2024 10:38:33 UTC
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f54344ec12c85fc732f79b6b0f19f45e99cf3e05 commit f54344ec12c85fc732f79b6b0f19f45e99cf3e05 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2023-11-21 17:33:08 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2024-02-27 10:37:33 +0000 kern_racct.c: Don't compile if RACCT undefined Just skip compiling this file if RACCT isn't defined. This allows to skip including headers that no code uses at all, and also to remove the whole file's #ifdef/#endif bracketing. Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit 7fa08d415283c9a0c1e2b57edfbb13d722c25735) Approved by: emaste (mentor) --- sys/conf/files | 2 +- sys/kern/kern_racct.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 4d5585b0bb79..b6a85d6a86a2 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3793,7 +3793,7 @@ kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_procctl.c standard kern/kern_prot.c standard -kern/kern_racct.c standard +kern/kern_racct.c optional racct kern/kern_rangelock.c standard kern/kern_rctl.c standard kern/kern_resource.c standard diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 37b77243fe0e..43c3da0c2320 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -59,8 +59,6 @@ #include <sys/rctl.h> #endif -#ifdef RACCT - FEATURE(racct, "Resource Accounting"); /* @@ -1364,5 +1362,3 @@ racct_init(void) prison0.pr_prison_racct = prison_racct_find("0"); } SYSINIT(racct, SI_SUB_RACCT, SI_ORDER_FIRST, racct_init, NULL); - -#endif /* !RACCT */