cc -pthread -Wall -Wextra -Werror=implicit-function-declaration pthread/pthread_barrierattr_setpshared.c -o pthread/pthread_barrierattr_setpshared -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -liconv pthread/pthread_barrierattr_setpshared.c:14:2: error: unknown type name 'pthread_barrierattr_t'; did you mean 'pthread_mutexattr_t'? 14 | 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_barrierattr_setpshared.c:15:16: error: call to undeclared function 'pthread_barrierattr_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 15 | if ( (errno = pthread_barrierattr_init(&attr)) ) | ^ pthread/pthread_barrierattr_setpshared.c:15: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_barrierattr_setpshared.c:18:16: error: call to undeclared function 'pthread_barrierattr_setpshared'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 18 | if ( (errno = pthread_barrierattr_setpshared(&attr, shared)) ) | ^ pthread/pthread_barrierattr_setpshared.c:18:16: note: did you mean 'pthread_mutexattr_setpshared'? /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:440:5: note: 'pthread_mutexattr_setpshared' declared here 440 | int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); | ^ pthread/pthread_barrierattr_setpshared.c:23:23: error: use of undeclared identifier 'pthread_barrier_t' 23 | size_t size = sizeof(pthread_barrier_t); | ^ pthread/pthread_barrierattr_setpshared.c:29:2: error: use of undeclared identifier 'pthread_barrier_t' 29 | pthread_barrier_t* barrier = ptr; | ^ pthread/pthread_barrierattr_setpshared.c:29:21: error: use of undeclared identifier 'barrier' 29 | pthread_barrier_t* barrier = ptr; | ^ pthread/pthread_barrierattr_setpshared.c:30:16: error: call to undeclared function 'pthread_barrier_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 30 | if ( (errno = pthread_barrier_init(barrier, &attr, 2)) ) | ^ pthread/pthread_barrierattr_setpshared.c:30:37: error: use of undeclared identifier 'barrier' 30 | if ( (errno = pthread_barrier_init(barrier, &attr, 2)) ) | ^ pthread/pthread_barrierattr_setpshared.c:35:16: error: call to undeclared function 'pthread_barrier_wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 35 | if ( (errno = pthread_barrier_wait(barrier)) && | ^ pthread/pthread_barrierattr_setpshared.c:35:37: error: use of undeclared identifier 'barrier' 35 | if ( (errno = pthread_barrier_wait(barrier)) && | ^ pthread/pthread_barrierattr_setpshared.c:36:16: error: use of undeclared identifier 'PTHREAD_BARRIER_SERIAL_THREAD' 36 | errno != PTHREAD_BARRIER_SERIAL_THREAD ) | ^ 11 errors generated.