Nothing in kiki actually uses this method as far as I can see, but gcc still warns about the getwd usage, and I suppose changing this might make the Hurd folks happy. Peter De Wachter (pdewacht@gmail.com) placed in the public domain Status: in upstream CVS --- a/kodilib/src/tools/KFileTools.cpp +++ b/kodilib/src/tools/KFileTools.cpp @@ -44,15 +44,21 @@ // -------------------------------------------------------------------------------------------------------- string kFileGetCurrentPath () { -#ifndef WIN32 +#ifdef _GNU_SOURCE + char * buffer = get_current_dir_name(); + string current_path(buffer); + free(buffer); + return current_path; +#else + #ifndef WIN32 char buffer[MAXPATHLEN+1]; getwd(buffer); -#else - char buffer[MAX_PATH+1]; - getcwd(buffer, MAX_PATH+1); -#endif - + #else + char buffer[MAX_PATH+1]; + getcwd(buffer, MAX_PATH+1); + #endif return string(buffer); +#endif } // --------------------------------------------------------------------------------------------------------