unistd.h included to compile on Mac