Bug 293493 - in_pcb.h pulls in kernel headers when used in userspace
Summary: in_pcb.h pulls in kernel headers when used in userspace
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-27 17:47 UTC by Nick Reilly
Modified: 2026-02-28 02:52 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 Nick Reilly 2026-02-27 17:47:27 UTC
in_pcb.h contains the definition of struct xinpcb for use by userspace applications. While it does have some sections of the file that are #ifdef _KERNEL, there are many other kernel parts that are not guarded, for example the first block of includes has kernel epoch and locking headers. My expectation is that these should not be pulled in when compiling user space code that uses the struct xinpcb.
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2026-02-28 02:52:39 UTC
Thanks Nick, that's a correct observation and needs to be improved. If you have a patch that is ready and tested (passes buildworld at least, but better pass tinderbox) I can push with your name as author.