cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations semaphore/sem_timedwait.c -o semaphore/sem_timedwait -D_POSIX_C_SOURCE=202405L -lm -lpthread -lrt relibc getrlimit(3, 0x7ffffffffc80): not implemented relibc getrlimit(3, 0x7ffffffffbb0): not implemented relibc getrlimit(9, 0x7ffffffffb70): not implemented relibc getrlimit(9, 0x7ffffffffba0): not implemented relibc getrlimit(5, 0x7ffffffffba0): not implemented relibc getrlimit(9, 0x7ffffffffb70): not implemented In file included from semaphore/sem_timedwait.c:1: /usr/include/semaphore.h:51:57: error: unknown type name 'timespec' 51 | int sem_clockwait(sem_t *sem, clockid_t clock_id, const timespec *abstime); | ^~~~~~~~ /usr/include/semaphore.h:56:37: error: unknown type name 'timespec' 56 | int sem_timedwait(sem_t *sem, const timespec *abstime); | ^~~~~~~~ semaphore/sem_timedwait.c:5:64: error: initialization of 'int (*)(sem_t * restrict, const struct timespec * restrict)' from incompatible pointer type 'int (*)(sem_t *, const int *)' [-Werror=incompatible-pointer-types] 5 | int (*foo)(sem_t *restrict, const struct timespec *restrict) = sem_timedwait; | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors