diff options
author | Lassebq <lassebq.mine@gmail.com> | 2024-06-15 15:15:11 +0300 |
---|---|---|
committer | Anna Wilcox <awilcox@wilcox-tech.com> | 2024-10-22 18:46:32 +0000 |
commit | 5f3f23455481dfded84206d4ad15c7578c210f17 (patch) | |
tree | aa3e2ea190c70276a05cceccf440907f47fa30b8 | |
parent | ba006852eb83e920b8f5fe9d0a17013b70dde212 (diff) | |
download | gcompat-5f3f23455481dfded84206d4ad15c7578c210f17.tar.gz gcompat-5f3f23455481dfded84206d4ad15c7578c210f17.tar.bz2 gcompat-5f3f23455481dfded84206d4ad15c7578c210f17.tar.xz gcompat-5f3f23455481dfded84206d4ad15c7578c210f17.zip |
stdlib: canonicalize_file_name
-rw-r--r-- | libgcompat/stdlib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libgcompat/stdlib.c b/libgcompat/stdlib.c index 82f7602..2d3e5f7 100644 --- a/libgcompat/stdlib.c +++ b/libgcompat/stdlib.c @@ -22,6 +22,13 @@ char *__realpath_chk(const char *path, char *resolved_path, size_t resolved_len) } /** + * Return the canonicalized absolute pathname + */ +char *canonicalize_file_name(const char *path) { + return realpath(path, NULL); +} + +/** * Get an environment variable. */ char *__secure_getenv(const char *name) |