cc -pthread -Wall -Wextra -Werror=implicit-function-declaration pthread/pthread_setcancelstate.c -o pthread/pthread_setcancelstate -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt -lintl -liconv pthread/pthread_setcancelstate.c: In function ‘start’: pthread/pthread_setcancelstate.c:19:23: error: implicit declaration of function ‘pthread_setcancelstate’ [-Wimplicit-function-declaration] 19 | if ( (errno = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state)) ) | ^~~~~~~~~~~~~~~~~~~~~~ pthread/pthread_setcancelstate.c:19:46: error: ‘PTHREAD_CANCEL_DISABLE’ undeclared (first use in this function) 19 | if ( (errno = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state)) ) | ^~~~~~~~~~~~~~~~~~~~~~ pthread/pthread_setcancelstate.c:19:46: note: each undeclared identifier is reported only once for each function it appears in pthread/pthread_setcancelstate.c:21:27: error: ‘PTHREAD_CANCEL_ENABLE’ undeclared (first use in this function); did you mean ‘PTHREAD_CREATE_JOINABLE’? 21 | if ( old_state != PTHREAD_CANCEL_ENABLE ) | ^~~~~~~~~~~~~~~~~~~~~ | PTHREAD_CREATE_JOINABLE pthread/pthread_setcancelstate.c: In function ‘main’: pthread/pthread_setcancelstate.c:43:46: error: ‘PTHREAD_CANCEL_ENABLE’ undeclared (first use in this function); did you mean ‘PTHREAD_CREATE_JOINABLE’? 43 | if ( (errno = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_state)) ) | ^~~~~~~~~~~~~~~~~~~~~ | PTHREAD_CREATE_JOINABLE pthread/pthread_setcancelstate.c:53:23: error: implicit declaration of function ‘pthread_cancel’; did you mean ‘pthread_once’? [-Wimplicit-function-declaration] 53 | if ( (errno = pthread_cancel(thread)) ) | ^~~~~~~~~~~~~~ | pthread_once pthread/pthread_setcancelstate.c:65:24: error: ‘PTHREAD_CANCELED’ undeclared (first use in this function); did you mean ‘PTHREAD_NULL’? 65 | if ( result != PTHREAD_CANCELED ) | ^~~~~~~~~~~~~~~~ | PTHREAD_NULL