Fix build with non-GNU libcs.
* util/misc.c (canonicalize_file_name): Move to ... * kern/emu/misc.c (canonicalize_file_name): ... here. Needed by grub_make_system_path_relative_to_its_root.
This commit is contained in:
parent
7fb5c25fd0
commit
355b51e9b5
3 changed files with 21 additions and 13 deletions
|
@ -176,6 +176,19 @@ grub_get_rtc (void)
|
|||
* GRUB_TICKS_PER_SECOND / 1000000));
|
||||
}
|
||||
|
||||
char *
|
||||
canonicalize_file_name (const char *path)
|
||||
{
|
||||
char *ret;
|
||||
#ifdef PATH_MAX
|
||||
ret = xmalloc (PATH_MAX);
|
||||
(void) realpath (path, ret);
|
||||
#else
|
||||
ret = realpath (path, NULL);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
/* Convert POSIX path to Win32 path,
|
||||
remove drive letter, replace backslashes. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue