Skip to content

Commit 86be8bf

Browse files
Nicholas LowellNicholas Lowell
authored andcommitted
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 dc45c93 commit 86be8bf

File tree

2 files changed

+416
-259
lines changed

2 files changed

+416
-259
lines changed

0 commit comments

Comments
 (0)