Ensure that getopt() gets declared by <unistd.h>.