HomeFreeBSD

timerfd: Namespace pollution adjustments

Description

timerfd: Namespace pollution adjustments

Do not pollute userspace with <sys/proc.h>, instead declare struct thread
when _KERNEL is defined.

Include <sys/time.h> instead of <sys/timespec.h>. This causes intentional
namespace pollution that mimics Linux. g/musl libcs include <time.h> in
their <sys/timerfd.h>, exposing clock gettime, settime functions and
CLOCK_ macro constants. Ports like Chromium expect this namespace
pollution and fail without it.

MFC After: 3 days
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D41641

(cherry picked from commit fb5daae920bae84e3eec8175bf9e46304c3b2ae6)

Details

Provenance
jfreeAuthored on Sep 17 2023, 3:02 PM
impCommitted on Sep 17 2023, 3:02 PM
Reviewer
imp
Differential Revision
D41641: timerfd: Namespace pollution adjustments
Parents
rG27d567847b18: timerfd: Relocate 32-bit compat code
Branches
Unknown
Tags
Unknown