Use getcwd() instead of get_current_dir_name().
[tinc] / src / bsd /
drwxr-xr-x   ..
-rw-r--r-- 11956 device.c
-rw-r--r-- 7105 tunemu.c
-rw-r--r-- 1067 tunemu.h