cc -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations spawn/posix_spawnattr_getschedpolicy.c -o spawn/posix_spawnattr_getschedpolicy -D_POSIX_C_SOURCE=202405L -lm -lpthread -liconv spawn/posix_spawnattr_getschedpolicy.c:6:64: error: use of undeclared identifier 'posix_spawnattr_getschedpolicy'; did you mean 'posix_spawnattr_getsigdefault'? 6 | int (*foo)(const posix_spawnattr_t *restrict, int *restrict) = posix_spawnattr_getschedpolicy; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | posix_spawnattr_getsigdefault /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/spawn.h:87:9: note: 'posix_spawnattr_getsigdefault' declared here 87 | int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, | ^ spawn/posix_spawnattr_getschedpolicy.c:6:7: error: incompatible function pointer types initializing 'int (*)(const posix_spawnattr_t *restrict, int *restrict)' (aka 'int (*)(void *const *restrict, int *restrict)') with an expression of type 'int (const posix_spawnattr_t *restrict, sigset_t *restrict)' (aka 'int (void *const *restrict, unsigned int *restrict)') [-Wincompatible-function-pointer-types] 6 | int (*foo)(const posix_spawnattr_t *restrict, int *restrict) = posix_spawnattr_getschedpolicy; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.