From e7eaf95c0cdbc36aeda5828b10a2e424ed10f3c2 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Thu, 25 Feb 2021 00:05:19 +0100 Subject: musl fix (#3998) musl stdlib (Alpine Linux) doesn't know about canonicalize_file_name, replace with equivalent realpath calls --- src/fcopy/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fcopy') diff --git a/src/fcopy/main.c b/src/fcopy/main.c index f69448b67..572e9f601 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c @@ -178,7 +178,7 @@ static char *proc_pid_to_self(const char *target) { char *use_target = 0; char *proc_pid = 0; - if (!(use_target = canonicalize_file_name(target))) + if (!(use_target = realpath(target, NULL))) goto done; // target is under /proc/? @@ -192,7 +192,7 @@ static char *proc_pid_to_self(const char *target) { // check where /proc/self points to static const char proc_self[] = "/proc/self"; - if (!(proc_pid = canonicalize_file_name(proc_self))) + if (!(proc_pid = realpath(proc_self, NULL))) goto done; // redirect /proc/PID/xxx -> /proc/self/XXX -- cgit v1.2.3-54-g00ecf