From: Tony Ambardar Date: Wed, 6 Mar 2024 08:09:20 +0000 (-0800) Subject: rpcd-mod-luci: use standard POSIX header for basename() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4f2b94f0e0d4dda38e1cd9a761d114bfbacefdbe;p=project%2Fluci.git rpcd-mod-luci: use standard POSIX header for basename() The musl libc only implements POSIX basename() but provided a GNU header kludge in , which was removed in musl 1.2.5 [1]. Use the standard header to avoid compilation errors like: luci.c: In function 'rpc_luci_parse_network_device_sys': luci.c:676:53: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration] 676 | blobmsg_add_string(&blob, "master", basename(link)); | ^~~~~~~~ luci.c:676:53: error: passing argument 3 of 'blobmsg_add_string' makes pointer from integer without a cast [-Werror=int-conversion] 676 | blobmsg_add_string(&blob, "master", basename(link)); | ^~~~~~~~~~~~~~ | | | int ... cc1: all warnings being treated as errors Link 1: https://git.musl-libc.org/cgit/musl/log/?qt=grep&q=basename Signed-off-by: Tony Ambardar (cherry picked from commit 8b08b48df99c42918ab443dea29bd42652abed36) --- diff --git a/libs/rpcd-mod-luci/Makefile b/libs/rpcd-mod-luci/Makefile index ece32a4cc9..c5ed10196e 100644 --- a/libs/rpcd-mod-luci/Makefile +++ b/libs/rpcd-mod-luci/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rpcd-mod-luci -PKG_VERSION:=20230123 +PKG_VERSION:=20240305 PKG_RELEASE:=1 PKG_MAINTAINER:=Jo-Philipp Wich diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c index e21105d3c6..8b56dce6b7 100644 --- a/libs/rpcd-mod-luci/src/luci.c +++ b/libs/rpcd-mod-luci/src/luci.c @@ -19,7 +19,7 @@ #define _GNU_SOURCE #include -#include +#include #include #include #include