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)
(cherry picked from commit 8bcf9a87c79d8de05bc79ff2f8530bf4a52162ca)
Approved-by: re (gjb)

Details

Provenance
jfreeAuthored on Sep 17 2023, 3:02 PM
impCommitted on Oct 1 2023, 4:40 AM
Reviewer
imp
Differential Revision
D41641: timerfd: Namespace pollution adjustments
Parents
rGcefd82e00fec: vtgpu: Fix the physical memory size
Branches
Unknown
Tags
Unknown