posix: getopt: cannot use getopt() in a standard way #52749
Labels
area: POSIX
POSIX API Library
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
Getopt should be defined in
<unistd.h>
according to the POSIX specification. Of course, in Zephyr, that header is available in<zephyr/posix/unistd.h>
.https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
Please also mention any information which could help others to understand
the problem you're facing:
native_posix
types)specific commit? no, it's always been broken
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Impact
It's a showstopper for anyone expecting to be able to use standard POSIX code portably
Logs and console output
The warning below is promoted to error when run in twister
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: