Skip to content

Commit 9cd89da

Browse files
Nicholas LowellNicholas Lowell
Nicholas Lowell
authored and
Nicholas Lowell
committed
posix: sysconf: match _SC* defines with newlib/picolib
It's possible for newlib/picolib libc libraries to internally call sysconf() which would execute zephyr's implementation. However, if the _SC* defines do not have matching values, then the incorrect switch case executes. This issue arises when using newlib/picolib libc that includes sysconf implementation for ARM. With current defaults, the zephyr sysconf() overrides the original libc sysconf() so we must ensure proper operation. For Full Sysconf implementation, we will switch to the #define list just like newlib/picolib. We can't currently use their unistd.h directly due to a domino of declaration conflicts. For the "small" macro implementation, it remains with an enum list which is required for the macro to work. Signed-off-by: Nicholas Lowell <[email protected]>
1 parent 8dfff97 commit 9cd89da

File tree

2 files changed

+416
-259
lines changed

2 files changed

+416
-259
lines changed

0 commit comments

Comments
 (0)