Discussion:
test-getopt-posix fails on musl
Bruno Haible
2018-02-24 09:31:55 UTC
Permalink
Hi,

On Alpine Linux 3.7.0, which uses musl libc, the gnulib test 'test-getopt-posix'
fails. To me, this looks like a POSIX compliance bug of musl.
Find attached a reduced test case.

$ gcc foo.c -Wall
$ ./a.ou t
foo.c:134: assertion 'options[0] == ':' || ((options[0] == '-' || options[0] == '+') && options[1] == ':')' failed

Reference: POSIX
http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
Loading...