Fix build for GNU/Hurd by removing the PATH_MAX usage (#11816)

This commit is contained in:
radare 2018-10-15 15:17:42 +02:00 committed by GitHub
parent 3bf4288577
commit e2f1fe1da6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,11 +206,10 @@ R_API char *r_file_abspath(const char *file) {
ret = strdup (file);
}
#if __UNIX__
char resolved_path[PATH_MAX] = {0};
char *abspath = realpath (ret, resolved_path);
char *abspath = realpath (ret, NULL);
if (abspath) {
free (ret);
ret = strdup (abspath);
ret = abspath;
}
#endif
return ret;