]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sysctl: make sys/sysctl.h self contained
authorWarner Losh <imp@FreeBSD.org>
Mon, 11 Oct 2021 17:14:51 +0000 (11:14 -0600)
committerWarner Losh <imp@FreeBSD.org>
Mon, 11 Oct 2021 17:20:07 +0000 (11:20 -0600)
commit56ee5c551f89e767e931c55e063a20abd0c55346
tree0f281592b78dee8ad4c361f704f134a078a1bc3b
parente8f26e5dc859a8fbc663e108421f657325ca3054
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
sys/sys/sysctl.h