Always include unistd.h, not just on Unix systems
Fixed missing return value