[PATCH] unit: use l_basename in test-path

James Prestwood <[email protected]> Thu, 27 Feb 2025 07:00:58 -0800
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
This fixes a compiler error on musl
---
 unit/test-path.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unit/test-path.c b/unit/test-path.c
index 1f74423..f01fa52 100644
--- a/unit/test-path.c
+++ b/unit/test-path.c
@@ -55,14 +55,14 @@ static void test_path_find(const void *data)
 	static const char *cant_find = "/foo:/bar:/dir:fr";
 	static const char *can_find = "/tmp";
 	char *tmp_path = l_strdup("/tmp/foobarXXXXXX.tmp");
-	char *base;
+	const char *base;
 	char *path;
 	int fd;
 
 	fd = L_TFR(mkostemps(tmp_path, 4, O_CLOEXEC));
 	assert(fd > 0);
 	L_TFR(close(fd));
-	base = basename(tmp_path);
+	base = l_basename(tmp_path);
 
 	assert(l_path_find(base, cant_find, F_OK) == NULL);
 
-- 
2.34.1