musl: add getopt support for non-option arguments
authorJohn Crispin <john@openwrt.org>
Wed, 19 Nov 2014 09:21:02 +0000 (09:21 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 19 Nov 2014 09:21:02 +0000 (09:21 +0000)
commit46357027b0191427c3a813d7ff3c3bc1b4513bd1
tree2173535988b704728036a59947f7b9d1008b94c6
parentbf7b0a6ecc130ae45edc8da4bc1beae38416f90f
musl: add getopt support for non-option arguments

musl libc doesn't support the GNU getopt extension to parse non-option
arguments when the optstring starts with '-'.

This extension is used by some utilities, notably iptables, that
currently return with errors even with perfectly valid invocations.

The patch adds the code needed by getopt.c and getopt_long.c to
implement that extension.

Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it>
SVN-Revision: 43309
toolchain/musl/patches/120-getopt_non-option-arguments_fix.patch [new file with mode: 0644]