Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
You need to define _XOPEN_SOURCE 500 before your includes:
_XOPEN_SOURCE 500
#define _XOPEN_SOURCE 500 #include<unistd.h>
Otherwise, the unistd.h header won't see the macro definition.
unistd.h