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

Details

Provenance
jfreeAuthored on Sep 5 2023, 10:11 PM
impCommitted on Sep 5 2023, 10:25 PM
Reviewer
imp
Differential Revision
D41641: timerfd: Namespace pollution adjustments
Parents
rGa1f506156c4d: timerfd: Define a locking regime
Branches
Unknown
Tags
Unknown