posix: gettimeofday is not a part of POSIX_TIMERS but XSI_SINGLE_PROCESS #88556
Labels
area: POSIX
POSIX API Library
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
The
gettimeofday()
implementation in the POSIX API is incorrectly categorized as part ofPOSIX_TIMERS
whereas it should be a part ofXSI_SINGLE_PROCESS
along withputenv()
andgethostid()
.https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
zephyr/lib/posix/options/clock.c
Line 272 in d453fb9
zephyr/lib/posix/options/CMakeLists.txt
Line 116 in d453fb9
Please also mention any information which could help others to understand
the problem you're facing:
To Reproduce
Steps to reproduce the behavior:
The most obvious way to produce a compilation error is to remove the line
CONFIG_POSIX_TIMERS=y
fromtests/lib/time/prj.conf
and observe that there is a missing reference togettimeofday()
, which the test needed to leverage because Picolibc'stime()
function call callsgettimeofday()
, and then you see that it'sExpected behavior
gettimeofday()
should be callable when the optionCONFIG_XSI_SINGLE_PROCESS
is enabled, and not via dependency onCONFIG_POSIX_TIMERS
.Impact
Just a little broken. Some dependency cycles, layering violations, etc.
Logs and console output
Environment (please complete the following information):
Additional context
See also #88555
Encountered in the process of working on #88547
The text was updated successfully, but these errors were encountered: