On Sun, Jul 5, 2020 at 4:00 PM Bruno Haible via cfarm-users < cfarm-users@lists.tetaneutral.net> wrote:
> 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 > And getopt(3) with long options is a GNU extension implemented by glibc, some other libc also provides similar interfaces (such as FreeBSD with getopt_long). However it seems that AIX does not have a similar interface so the best option is indeed to use gnulib. -- "Tradition is not the worship of ashes, but the preservation of fire." - Gustav Mahler
_______________________________________________ cfarm-users mailing list cfarm-users@lists.tetaneutral.net https://lists.tetaneutral.net/listinfo/cfarm-users