From 208bb1514958b8357ea9fb12add5d760c3564fee Mon Sep 17 00:00:00 2001 From: maxice8 <30738253+maxice8@users.noreply.github.com> Date: Thu, 24 Jan 2019 11:26:05 -0200 Subject: [PATCH] tools/shared.c: Use portable realpath() instead of (#606) canonicalize_file_name() Fixes compilation on musl systems --- tools/shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shared.c b/tools/shared.c index 992e2de7..00ecdf9e 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -30,7 +30,7 @@ udev_device_from_path(struct udev *udev, const char *path) const char *event_node_prefix = "/dev/input/event"; _cleanup_(freep) char *path_canonical = NULL; - if ((path_canonical = canonicalize_file_name(path)) == NULL) { + if ((path_canonical = realpath(path, NULL)) == NULL) { error("Failed to canonicalize path '%s': %s\n", path, strerror(errno)); return NULL; }