ack
ack copied to clipboard
ACK libc defines getopt () and friends, but <unistd.h> does not declare them
While trying to build a program of mine with ACK, I got the following errors:
"lfanew.c", line 114: (warning) implicit declaration of function getopt
"lfanew.c", line 122: optarg undefined
"lfanew.c", line 128: optind undefined
Oddly enough, it seems that ACK's libc does define getopt () and its companion variables. The errors are only happening because ACK's <unistd.h> lacks the needed declarations.
Thank you!