fix errno value for getcwd when size argument is zero
[musl] / lib /
drwxr-xr-x   ..
-rw-r--r-- 0 empty