1
0
forked from drath/libratbag

tools/shared.c: Use portable realpath() instead of (#606)

canonicalize_file_name()

Fixes compilation on musl systems
This commit is contained in:
maxice8
2019-01-24 11:26:05 -02:00
committed by Jente Hidskes
parent 549a6c47b8
commit 208bb15149

View File

@@ -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;
}