Closed dashesy closed 9 years ago
This is a Linux-ism. The current setup is actually correct according to the POSIX standard, which puts getopt
in unistd.h
. It looks like defining _POSIX_C_SOURCE >= 2 may be more correct. I want to double-check before adding distro-specific patches and other things that break it elsewhere, since heatshrink will be running in many unusual environments. It's easily patched locally, though.
This should now be resolved via #10 and #12 .
In order to use getopt
To fix I just had to add this line to the beginning of heatshrink.c
define _XOPEN_SOURCE
The manpage also mentions this: http://linux.die.net/man/3/optarg