diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2020 +.Dd September 9, 2025 .Dt SYSCTL 9 .Os .Sh NAME @@ -97,7 +97,6 @@ .Nm SYSCTL_UQUAD .Nd Dynamic and static sysctl MIB creation functions .Sh SYNOPSIS -.In sys/param.h .In sys/sysctl.h .Fn SYSCTL_DECL name .Ft struct sysctl_oid * diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -41,6 +41,13 @@ #include #endif +#include +#include +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + /* * Definitions for sysctl call. The sysctl call uses a hierarchical name * for objects that can be examined or modified. The name is expressed as @@ -1223,13 +1230,6 @@ struct sbuf *sbuf_new_for_sysctl(struct sbuf *, char *, int, struct sysctl_req *); #else /* !_KERNEL */ -#include -#include -#ifndef _SIZE_T_DECLARED -typedef __size_t size_t; -#define _SIZE_T_DECLARED -#endif - __BEGIN_DECLS int sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t); int sysctlbyname(const char *, void *, size_t *, const void *, size_t);