cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations semaphore/sem_clockwait.c -o semaphore/sem_clockwait -D_POSIX_C_SOURCE=202405L -lm -lpthread -liconv semaphore/sem_clockwait.c:5:29: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] 5 | int (*foo)(sem_t *restrict, clockid_t, const struct timespec *restrict) = sem_clockwait; | ^ | int semaphore/sem_clockwait.c:5:75: error: use of undeclared identifier 'sem_clockwait'; did you mean 'sem_trywait'? 5 | int (*foo)(sem_t *restrict, clockid_t, const struct timespec *restrict) = sem_clockwait; | ^~~~~~~~~~~~~ | sem_trywait /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:58:5: note: 'sem_trywait' declared here 58 | int sem_trywait(sem_t *); | ^ semaphore/sem_clockwait.c:5:7: error: incompatible function pointer types initializing 'int (*)(sem_t *restrict, int, const struct timespec *restrict)' (aka 'int (*)(int *restrict, int, const struct timespec *restrict)') with an expression of type 'int (sem_t *)' (aka 'int (int *)') [-Wincompatible-function-pointer-types] 5 | int (*foo)(sem_t *restrict, clockid_t, const struct timespec *restrict) = sem_clockwait; | ^ ~~~~~~~~~~~~~ 3 errors generated.