Bug 198178 - sys/sysctl.h should probably include sys/types.h
Summary: sys/sysctl.h should probably include sys/types.h
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-02 19:08 UTC by Eric Fiselier
Modified: 2015-07-08 14:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.