From 5f3f23455481dfded84206d4ad15c7578c210f17 Mon Sep 17 00:00:00 2001 From: Lassebq Date: Sat, 15 Jun 2024 15:15:11 +0300 Subject: stdlib: canonicalize_file_name --- libgcompat/stdlib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libgcompat/stdlib.c b/libgcompat/stdlib.c index 82f7602..2d3e5f7 100644 --- a/libgcompat/stdlib.c +++ b/libgcompat/stdlib.c @@ -21,6 +21,13 @@ char *__realpath_chk(const char *path, char *resolved_path, size_t resolved_len) return realpath(path, resolved_path); } +/** + * Return the canonicalized absolute pathname + */ +char *canonicalize_file_name(const char *path) { + return realpath(path, NULL); +} + /** * Get an environment variable. */ -- cgit v1.2.3-70-g09d2