Added missing #include <unistd.h>