src/file.c:130:36: warning: call to undeclared function 'get_current_dir_name'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
char *currentDir = get_current_dir_name();
^
src/file.c:130:23:
char *currentDir = get_current_dir_name();
^ ~~~~~~~~~~~~~~~~~~~~~~
src/file.c:144:39: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
char *curDir = get_current_dir_name();
^ ~~~~~~~~~~~~~~~~~~~~~~
src/file.c:190:39: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
char *curDir = get_current_dir_name();
^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning and 3 errors generated.
I believe that
getcwd
should be used here.Version: 2.5.1 FreeBSD 14.1