cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations pthread/pthread_spin_unlock.c -o pthread/pthread_spin_unlock -D_POSIX_C_SOURCE=202405L -lm -lpthread -liconv pthread/pthread_spin_unlock.c:5:12: error: unknown type name 'pthread_spinlock_t'; did you mean 'pthread_rwlock_t'? int (*foo)(pthread_spinlock_t *) = pthread_spin_unlock; ^~~~~~~~~~~~~~~~~~ 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 typedef __darwin_pthread_rwlock_t pthread_rwlock_t; ^ pthread/pthread_spin_unlock.c:5:36: error: use of undeclared identifier 'pthread_spin_unlock'; did you mean 'pthread_mutex_unlock'? int (*foo)(pthread_spinlock_t *) = pthread_spin_unlock; ^~~~~~~~~~~~~~~~~~~ pthread_mutex_unlock /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:405:5: note: 'pthread_mutex_unlock' declared here int pthread_mutex_unlock(pthread_mutex_t *); ^ pthread/pthread_spin_unlock.c:5:7: error: incompatible function pointer types initializing 'int (*)(pthread_rwlock_t *)' (aka 'int (*)(struct _opaque_pthread_rwlock_t *)') with an expression of type 'int (pthread_mutex_t * _Nonnull)' (aka 'int (struct _opaque_pthread_mutex_t * _Nonnull)') [-Werror,-Wincompatible-function-pointer-types] int (*foo)(pthread_spinlock_t *) = pthread_spin_unlock; ^ ~~~~~~~~~~~~~~~~~~~ 3 errors generated.