void-packages/srcpkgs/libratbag/patches/fix-musl.patch

29 lines
878 B
Diff

From e1b8235dba615c221afc41588f9c3f73e337e9c6 Mon Sep 17 00:00:00 2001
From: maxice8 <thinkabit.ukim@gmail.com>
Date: Thu, 24 Jan 2019 07:23:36 -0200
Subject: [PATCH] tools/shared.c: Use portable realpath() instead of
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 992e2de..00ecdf9 100644
--- tools/shared.c
+++ 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;
}
--
2.20.1