forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters