cc -pipe -O -pthread -Wall -Wextra -Werror=implicit-function-declaration unistd/posix_close.c -o unistd/posix_close -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt -lrt -lcrypt unistd/posix_close.c: In function 'main': unistd/posix_close.c:9:7: error: implicit declaration of function 'posix_close'; did you mean 'pclose'? [-Werror=implicit-function-declaration] if ( posix_close(0, POSIX_CLOSE_RESTART) < 0 ) ^~~~~~~~~~~ pclose unistd/posix_close.c:9:22: error: 'POSIX_CLOSE_RESTART' undeclared (first use in this function) if ( posix_close(0, POSIX_CLOSE_RESTART) < 0 ) ^~~~~~~~~~~~~~~~~~~ unistd/posix_close.c:9:22: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors