cc -pthread -Wall -Wextra -Werror=implicit-function-declaration pthread/pthread_barrier_wait.c -o pthread/pthread_barrier_wait -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -liconv pthread/pthread_barrier_wait.c:8:8: error: unknown type name 'pthread_barrier_t' 8 | static pthread_barrier_t barrier; | ^ pthread/pthread_barrier_wait.c:14:16: error: call to undeclared function 'pthread_barrier_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 14 | if ( (errno = pthread_barrier_wait(&barrier)) && | ^ pthread/pthread_barrier_wait.c:15:16: error: use of undeclared identifier 'PTHREAD_BARRIER_SERIAL_THREAD' 15 | errno != PTHREAD_BARRIER_SERIAL_THREAD ) | ^ pthread/pthread_barrier_wait.c:22:2: error: unknown type name 'pthread_barrierattr_t'; did you mean 'pthread_mutexattr_t'? 22 | pthread_barrierattr_t attr; | ^~~~~~~~~~~~~~~~~~~~~ | pthread_mutexattr_t /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h:31:38: note: 'pthread_mutexattr_t' declared here 31 | typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t; | ^ pthread/pthread_barrier_wait.c:23:16: error: call to undeclared function 'pthread_barrierattr_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 23 | if ( (errno = pthread_barrierattr_init(&attr)) ) | ^ pthread/pthread_barrier_wait.c:23:16: note: did you mean 'pthread_mutexattr_init'? /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:431:5: note: 'pthread_mutexattr_init' declared here 431 | int pthread_mutexattr_init(pthread_mutexattr_t *); | ^ pthread/pthread_barrier_wait.c:25:16: error: call to undeclared function 'pthread_barrier_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 25 | if ( (errno = pthread_barrier_init(&barrier, &attr, 2)) ) | ^ pthread/pthread_barrier_wait.c:30:16: error: call to undeclared function 'pthread_barrier_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 30 | if ( (errno = pthread_barrier_wait(&barrier)) && | ^ pthread/pthread_barrier_wait.c:31:16: error: use of undeclared identifier 'PTHREAD_BARRIER_SERIAL_THREAD' 31 | errno != PTHREAD_BARRIER_SERIAL_THREAD ) | ^ 8 errors generated.