mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 19:01:56 +00:00
The musl libc only implements POSIX basename() but provided a GNU header
kludge in <string.h>, which was removed in musl 1.2.5 [1]. Use the standard
<libgen.h> 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 <itugrok@yahoo.com>
56 lines
1.2 KiB
Makefile
56 lines
1.2 KiB
Makefile
#
|
|
# Copyright (C) 2016-2017 Jo-Philipp Wich <jo@mein.io>
|
|
#
|
|
# Licensed under the Apache License, Version 2.0.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=rpcd-mod-luci
|
|
PKG_VERSION:=20240305
|
|
PKG_RELEASE:=1
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
|
|
|
PKG_LICENSE:=Apache-2.0
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_BUILD_DEPENDS:=iwinfo
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
TARGET_CFLAGS += \
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
|
-I$(STAGING_DIR)/usr/include \
|
|
|
|
CMAKE_OPTIONS += \
|
|
-DLIBNL_LIBS=-lnl-tiny \
|
|
|
|
define Build/Prepare
|
|
$(INSTALL_DIR) $(PKG_BUILD_DIR)
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
endef
|
|
|
|
define Package/rpcd-mod-luci
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE:=Rapid reverse DNS rpcd module
|
|
DEPENDS:=+rpcd +libubox +libubus +libnl-tiny
|
|
endef
|
|
|
|
define Package/rpcd-mod-luci/description
|
|
Provides LuCI backend ubus RPC operations.
|
|
endef
|
|
|
|
define Package/rpcd-mod-luci/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/rpcd
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/luci.so $(1)/usr/lib/rpcd/
|
|
endef
|
|
|
|
define Package/rpcd-mod-luci/postinst
|
|
#!/bin/sh
|
|
[ -n "$$IPKG_INSTROOT" ] || /etc/init.d/rpcd reload
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,rpcd-mod-luci))
|