> > > -------- Original Message -------- > Subject: RE: [musl] bug in getopt_long() > From: > Date: Sat, January 07, 2017 8:13 am > To: musl@lists.openwall.com > > > > > > > > -------- Original Message -------- > > Subject: [musl] bug in getopt_long() > > From: "Anthony G. Basile" > > Date: Thu, January 05, 2017 9:00 am > > To: musl@lists.openwall.com > > > > Hi, > > > > We hit a bug in Gentoo with getopt_long(). It appears the alpine people > > hit it too http://bugs.alpinelinux.org/issues/4802. The problem was > > encountered in open-iscsi but I got some reduced code which I've > > attached. If you build and run that code as `./test --portal > > 10.144.0.14 --discover` then you get > > > > p > > D > > unrecognized character 'D' > > > > On a glibc system, you don't get the "unrecognized character 'D'" which > > is what we'd expect. Rich suggested a patch to musl which looked like > > it might work, but it didn't. I didn't investigate further. I'm just > > reporting it first to see if others know what's up. > > > > The attached patch should work, I believe; tested with both of the > following: > > ./a.out --portal 10.144.0.14 --discover > ./a.out --portal 10.144.0.14 --discover -- foo bar Behavior after my original patch deviated from glibc in the following case: ./a.out -a -b -c -d -e --discover The attached updated patch should do the trick for all three cases. midipix > > midipix > > > > > > -- > > Anthony G. Basile, Ph.D. > > Gentoo Linux Developer [Hardened] > > E-Mail : basile@freeharbor.net > > GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA > > GnuPG ID : F52D4BBA > >