Page MenuHomeFreeBSD

tools/build: Provide modern sysctl.h for bootstrap tools
AbandonedPublic

Authored by markj on Sep 4 2025, 1:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 9:07 AM
Unknown Object (File)
Sat, Oct 11, 12:48 PM
Unknown Object (File)
Sat, Oct 11, 12:48 PM
Unknown Object (File)
Sat, Oct 11, 4:37 AM
Unknown Object (File)
Fri, Oct 10, 9:21 AM
Unknown Object (File)
Thu, Sep 25, 6:33 AM
Unknown Object (File)
Wed, Sep 24, 1:50 AM
Unknown Object (File)
Tue, Sep 23, 10:46 AM
Subscribers
None

Details

Reviewers
imp
jrtc27
Summary

When building from 13, bootstrapping certctl fails because certctl.c
includes sys/sysctl.h but not sys/types.h. Prior to commit
56ee5c551f89e consumers were required to include sys/types.h explicitly
to provide a definition for size_t.

Since the user-facing portion of sys/sysctl.h hasn't changed otherwise,
just add it to SYSINCS on FreeBSD to work around this problem. We
already provide a sys/sysctl.h for cross-building from other OSs.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66816
Build 63699: arc lint + arc unit

Event Timeline

markj requested review of this revision.Sep 4 2025, 1:28 PM
markj created this revision.

Any comments on this patch? Am I going about this the wrong way?

Just because sys/sysctl.h is self-contained doesn't mean certctl.c shouldn't also be including sys/types.h. Presumably it itself is using types from that header and so should explicitly include it, regardless of whether sys/sysctl.h is including it for its own needs (which is an implementation detail; what means it uses to give things it defines the right types is up to it). And given style(9) header ordering rules that would mean including sys/types.h first, which would render this obsolete.