cc -pthread -Wall -Wextra -Werror=implicit-function-declaration pthread/pthread_cleanup_pop.c -o pthread/pthread_cleanup_pop -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt -lintl -liconv pthread/pthread_cleanup_pop.c: In function ‘start’: pthread/pthread_cleanup_pop.c:35:9: error: implicit declaration of function ‘pthread_cleanup_push’ [-Wimplicit-function-declaration] 35 | pthread_cleanup_push(cleanup1, NULL); | ^~~~~~~~~~~~~~~~~~~~ pthread/pthread_cleanup_pop.c:40:9: error: implicit declaration of function ‘pthread_cleanup_pop’ [-Wimplicit-function-declaration] 40 | pthread_cleanup_pop(0); | ^~~~~~~~~~~~~~~~~~~ pthread/pthread_cleanup_pop.c:43:17: error: implicit declaration of function ‘pthread_setcancelstate’ [-Wimplicit-function-declaration] 43 | pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); | ^~~~~~~~~~~~~~~~~~~~~~ pthread/pthread_cleanup_pop.c:43:40: error: ‘PTHREAD_CANCEL_DISABLE’ undeclared (first use in this function) 43 | pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); | ^~~~~~~~~~~~~~~~~~~~~~ pthread/pthread_cleanup_pop.c:43:40: note: each undeclared identifier is reported only once for each function it appears in pthread/pthread_cleanup_pop.c: In function ‘main’: pthread/pthread_cleanup_pop.c:66:23: error: implicit declaration of function ‘pthread_cancel’; did you mean ‘pthread_once’? [-Wimplicit-function-declaration] 66 | if ( (errno = pthread_cancel(thread)) ) | ^~~~~~~~~~~~~~ | pthread_once pthread/pthread_cleanup_pop.c:71:24: error: ‘PTHREAD_CANCELED’ undeclared (first use in this function); did you mean ‘PTHREAD_NULL’? 71 | if ( result != PTHREAD_CANCELED ) | ^~~~~~~~~~~~~~~~ | PTHREAD_NULL