Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From 781288d6307002cce70ddafb6efb200b7f60294d Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 16 Jun 2017 22:12:43 -0700 |
| 4 | Subject: [PATCH 3/6] Replace canonicalize_file_name with realpath() API |
| 5 | |
| 6 | Fixed build on musl where canonicalize_file_name is not implemented |
| 7 | |
| 8 | filesystem.cpp:46:15: error: 'canonicalize_file_name' was not declared in this scope |
| 9 | char *p = canonicalize_file_name(path); |
| 10 | |
| 11 | Upstream-Status: Pending |
| 12 | |
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 14 | --- |
| 15 | lib/engine/filesystem.cpp | 2 +- |
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 17 | |
| 18 | diff --git a/lib/engine/filesystem.cpp b/lib/engine/filesystem.cpp |
| 19 | index b99257e..6064837 100644 |
| 20 | --- a/lib/engine/filesystem.cpp |
| 21 | +++ b/lib/engine/filesystem.cpp |
| 22 | @@ -43,7 +43,7 @@ void CanonicalPath::__canonicalize_path_name(const char *path) |
| 23 | if (path == 0) { |
| 24 | throw E_NULL_POINTER; |
| 25 | } |
| 26 | - char *p = canonicalize_file_name(path); |
| 27 | + char *p = realpath(path, NULL); |
| 28 | assign(p); |
| 29 | if (p) { |
| 30 | free(p); |
| 31 | -- |
| 32 | 2.13.1 |
| 33 | |