Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 30 Sep 2012 23:22:04 +0200
From: John Spencer <>
Subject: Re: better compatibility with bsd getopt()

On 09/30/2012 11:06 PM, Daniel Cegiełka wrote:
> 2012/9/30 John Spencer<>:
>> an application that relies on non-posix getopt behaviour should come with a
>> configure check and use an alternate impl if the getopt detected is not
>> compatible.
>> almost any program does so already, but for those that don't (like iptables)
>> you can use (tarball available on
>> sabotage mirror, or in downloads section of the page).
>> this bundles the netbsd getopt into a standalone library that can easily be
>> linked to programs.
> Without optreset support some BSD programs will not be able to
> compile, like patch:

gnu-getopt (which is in fact netbsd getopt) includes support for 
optreset, and is compatible with gnu and bsd.

from the readme:

gnu getopt compatibility package for musl

make; make prefix= DESTDIR= install

then to compile a package, add to
CFLAGS="-Dgetopt=gnu_getopt -Dgetopt_long=gnu_getopt_long 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.