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)
This commit is contained in:
Olivier Certner 2023-11-21 18:33:08 +01:00 committed by Olivier Certner
parent e36cb22221
commit f54344ec12
No known key found for this signature in database
GPG key ID: 8CA13040971E2627
2 changed files with 1 additions and 5 deletions

View file

@ -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

View file

@ -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 */