cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations pthread/pthread_rwlock_timedwrlock.c -o pthread/pthread_rwlock_timedwrlock -D_POSIX_C_SOURCE=202405L -lm -lpthread -liconv pthread/pthread_rwlock_timedwrlock.c:5:75: error: use of undeclared identifier 'pthread_rwlock_timedwrlock'; did you mean 'pthread_rwlock_trywrlock'? int (*foo)(pthread_rwlock_t *restrict, const struct timespec *restrict) = pthread_rwlock_timedwrlock; ^~~~~~~~~~~~~~~~~~~~~~~~~~ pthread_rwlock_trywrlock /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:470:5: note: 'pthread_rwlock_trywrlock' declared here int pthread_rwlock_trywrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_trywrlock); ^ pthread/pthread_rwlock_timedwrlock.c:5:7: error: incompatible function pointer types initializing 'int (*)(pthread_rwlock_t *restrict, const struct timespec *restrict)' (aka 'int (*)(struct _opaque_pthread_rwlock_t *restrict, const struct timespec *restrict)') with an expression of type 'int (pthread_rwlock_t * _Nonnull)' (aka 'int (struct _opaque_pthread_rwlock_t * _Nonnull)') [-Werror,-Wincompatible-function-pointer-types] int (*foo)(pthread_rwlock_t *restrict, const struct timespec *restrict) = pthread_rwlock_timedwrlock; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.