void-packages/srcpkgs/connman/patches/musl.patch

17 lines
345 B
Diff
Raw Normal View History

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;