[cfarm-users] getopt on AIX
Bruno Haible
bruno at clisp.org
Sun Jul 5 20:59:32 CEST 2020
Jeffrey,
> b2sum-src/b2sum.c:266:26: error: array type has incomplete element
> type 'struct option'
> static struct option long_options[] = {
> ^~~~~~~~~~~~
When you use 'struct option', you need to
1) use Gnulib module 'getopt-gnu' - see the documentation
https://www.gnu.org/software/gnulib/manual/html_node/getopt.html
https://www.gnu.org/software/gnulib/manual/html_node/getopt_002eh.html
https://www.gnu.org/software/gnulib/manual/html_node/getopt_005flong.html
2) #include <getopt.h>, not <unistd.h> - see the documentation
https://www.gnu.org/software/gnulib/MODULES.html#module=getopt-gnu
Bruno
More information about the cfarm-users
mailing list