cc -O2 -pipe -pthread -Wall -Wextra -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations spawn/posix_spawn_file_actions_addchdir.c -o spawn/posix_spawn_file_actions_addchdir -D_POSIX_C_SOURCE=202405L -lm -lpthread -lrt -lstdthreads -lcrypt spawn/posix_spawn_file_actions_addchdir.c:6:74: error: use of undeclared identifier 'posix_spawn_file_actions_addchdir'; did you mean 'posix_spawn_file_actions_addclose'? 6 | int (*foo)(posix_spawn_file_actions_t *restrict, const char *restrict) = posix_spawn_file_actions_addchdir; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | posix_spawn_file_actions_addclose /usr/include/spawn.h:87:5: note: 'posix_spawn_file_actions_addclose' declared here 87 | int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int); | ^ spawn/posix_spawn_file_actions_addchdir.c:6:7: error: incompatible function pointer types initializing 'int (*)(posix_spawn_file_actions_t *restrict, const char *restrict)' (aka 'int (*)(struct __posix_spawn_file_actions **restrict, const char *restrict)') with an expression of type 'int (posix_spawn_file_actions_t *, int)' (aka 'int (struct __posix_spawn_file_actions **, int)') [-Wincompatible-function-pointer-types] 6 | int (*foo)(posix_spawn_file_actions_t *restrict, const char *restrict) = posix_spawn_file_actions_addchdir; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.