Bug 198178

Summary: sys/sysctl.h should probably include sys/types.h
Product: Base System Reporter: Eric Fiselier <eric>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: jilles
Priority: ---    
Version: 10.1-RELEASE   
Hardware: Any   
OS: Any   

Description Eric Fiselier 2015-03-02 19:08:53 UTC
sysctl.h seems to use u_int which is defined in sys/types.h. For this reason sysctl.h should probably include sys/types.h. Is there a reason this isn't done?
Comment 1 Jilles Tjoelker freebsd_committer freebsd_triage 2015-03-03 22:04:27 UTC
Historically, BSD has not included in headers all other headers that could possibly be necessary. One reason is to avoid namespace pollution. POSIX prescribes that its headers may be included by themselves, but <sys/sysctl.h> is not specified by POSIX.