ack icon indicating copy to clipboard operation
ack copied to clipboard

ACK libc defines getopt () and friends, but <unistd.h> does not declare them

Open tkchia opened this issue 2 years ago • 0 comments

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!

tkchia avatar Feb 09 '23 17:02 tkchia