From d0320dcec62aafa99281dbc43dbd4eb7fb53c284 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 26 Jan 2024 03:12:05 -0800 Subject: [PATCH] connman: fix basename on musl 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. --- srcpkgs/connman/patches/musl.patch | 16 ++++++++++++++++ srcpkgs/connman/template | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/connman/patches/musl.patch diff --git a/srcpkgs/connman/patches/musl.patch b/srcpkgs/connman/patches/musl.patch new file mode 100644 index 00000000000..4e38a44250b --- /dev/null +++ b/srcpkgs/connman/patches/musl.patch @@ -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; + diff --git a/srcpkgs/connman/template b/srcpkgs/connman/template index e908284366c..c4969eca592 100644 --- a/srcpkgs/connman/template +++ b/srcpkgs/connman/template @@ -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