It is a GNU extension that some ports have to patch away. Ports
replace it with just getcwd(NULL, 0) but it is technically not
really equivalent to that. It might be worth implementing it just
for that.
New description from get_current_dir_name(3):
get_current_dir_name() returns the value of the environment variable PWD if it points to the current directory. The value is returned verbatim. Symbolic links will not have been resolved. Relative paths will not have been made absolute. It falls back to getcwd(NULL, 0) otherwise. The return value must be freed.
Also here are the ones from the glibc manual:
- http://www.gnu.org/software/libc/manual/html_node/Working-Directory.html
- https://linux.die.net/man/3/getcwd
PR: 254092
Obtained from: musl libc