cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations pthread/pthread_mutex_timedlock.c -o pthread/pthread_mutex_timedlock -D_POSIX_C_SOURCE=202405L -lm -lpthread -liconv pthread/pthread_mutex_timedlock.c:5:74: error: use of undeclared identifier 'pthread_mutex_timedlock'; did you mean 'pthread_mutex_trylock'? int (*foo)(pthread_mutex_t *restrict, const struct timespec *restrict) = pthread_mutex_timedlock; ^~~~~~~~~~~~~~~~~~~~~~~ pthread_mutex_trylock /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:401:5: note: 'pthread_mutex_trylock' declared here int pthread_mutex_trylock(pthread_mutex_t *); ^ pthread/pthread_mutex_timedlock.c:5:7: error: incompatible function pointer types initializing 'int (*)(pthread_mutex_t *restrict, const struct timespec *restrict)' (aka 'int (*)(struct _opaque_pthread_mutex_t *restrict, const struct timespec *restrict)') 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_mutex_t *restrict, const struct timespec *restrict) = pthread_mutex_timedlock; ^ ~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.