HomeFreeBSD

sysctl: make sys/sysctl.h self contained

Description

sysctl: make sys/sysctl.h self contained

sys/sysctl.h only needs u_int and size_t from sys/types.h. When the
sysctl interface was designed, having one more more prerequisites
(especially sys/types.h) was the norm. Times have changed, and to make
things more portable, make sys/types.h optional. We do this by including
sys/_types.h, defining size_t if needed, and changing u_int to 'unsigned
int' in a prototype for userland builds. For kernel builds, sys/types.h
is still required.

Sponsored by: Netflix
Reviewed by: kib, jhb
Differential Revision: https://reviews.freebsd.org/D31827

Details

Provenance
impAuthored on Oct 11 2021, 5:14 PM
Reviewer
kib
Differential Revision
D31827: sysctl: make sys/sysctl.h self contained
Parents
rGe8f26e5dc859: bootstrap: No need to disable shared libraries for bootstrap tools
Branches
Unknown
Tags
Unknown