mirror of
https://github.com/void-linux/void-packages.git
synced 2025-10-03 09:05:09 +02:00
musl provides a compatibility basename declaration so applications expecting GNU basename could still compile even though musl doesn't provide GNU basename and only POSIX basename.
16 lines
345 B
Diff
16 lines
345 B
Diff
Add GNU basename macro for code that expects GNU basename
|
|
|
|
diff -rup src/log.c.orig src/log.c
|
|
--- a/src/log.c
|
|
+++ b/src/log.c
|
|
@@ -34,6 +34,10 @@
|
|
|
|
#include "connman.h"
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
|
|
+#endif
|
|
+
|
|
static const char *program_exec;
|
|
static const char *program_path;
|
|
|