Replaced <unistd.h> with <getopt.h> for portability.