Skip to content

Commit

Permalink
connman: fix basename on musl
Browse files Browse the repository at this point in the history
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
oreo639 committed Jan 28, 2024
1 parent c3dd053 commit c97cdd6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions srcpkgs/connman/patches/musl.patch
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;

2 changes: 1 addition & 1 deletion srcpkgs/connman/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'connman'
pkgname=connman
version=1.42
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-polkit --enable-client --enable-pie --enable-ethernet
--enable-wifi --enable-bluetooth --enable-loopback --enable-nmcompat
Expand Down

0 comments on commit c97cdd6

Please sign in to comment.