cc -pthread -Wall -Wextra -Werror=implicit-function-declaration pthread/pthread_spin_unlock.c -o pthread/pthread_spin_unlock -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -liconv pthread/pthread_spin_unlock.c:9:2: error: unknown type name 'pthread_spinlock_t'; did you mean 'pthread_rwlock_t'? 9 | pthread_spinlock_t lock; | ^~~~~~~~~~~~~~~~~~ | pthread_rwlock_t /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h:31:35: note: 'pthread_rwlock_t' declared here 31 | typedef __darwin_pthread_rwlock_t pthread_rwlock_t; | ^ pthread/pthread_spin_unlock.c:10:16: error: call to undeclared function 'pthread_spin_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 10 | if ( (errno = pthread_spin_init(&lock, 0)) ) | ^ pthread/pthread_spin_unlock.c:12:16: error: call to undeclared function 'pthread_spin_lock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 12 | if ( (errno = pthread_spin_lock(&lock)) ) | ^ pthread/pthread_spin_unlock.c:14:16: error: call to undeclared function 'pthread_spin_unlock'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 14 | if ( (errno = pthread_spin_unlock(&lock)) ) | ^ 4 errors generated.