[openwrt/openwrt] busybox: use external libtirpc when using glibc

LEDE Commits lede-commits at lists.infradead.org
Thu Apr 10 11:55:32 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/eed88d4f10b456355216103b6f57c1c1ad03caff

commit eed88d4f10b456355216103b6f57c1c1ad03caff
Author: Matthias Franck <matthias.franck at softathome.com>
AuthorDate: Fri Jan 31 10:00:46 2025 +0100

    busybox: use external libtirpc when using glibc
    
    In recent glibc versions rpc functionality has been moved to a separate
    library instead of glibc itself.
    Depend on this library when rpc functionality is needed and glibc is
    used.
    
    Signed-off-by: Matthias Franck <matthias.franck at softathome.com>
    Link: https://github.com/openwrt/openwrt/pull/17796
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 84e090086795a45d5580138436ce74b6170584ab)
---
 package/utils/busybox/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 7d302bd159..e3b9f256e0 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -48,7 +48,7 @@ define Package/busybox/Default
   MAINTAINER:=Felix Fietkau <nbd at nbd.name>
   TITLE:=Core utilities for embedded Linux
   URL:=http://busybox.net/
-  DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter
+  DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter +(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_MOUNT_NFS)||(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_INETD_RPC):libtirpc
   USERID:=ntp=123:ntp=123
 endef
 
@@ -104,6 +104,13 @@ ifeq ($(CONFIG_USE_GLIBC),y)
   LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv)
 endif
 
+ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_MOUNT_NFS)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_INETD_RPC),)
+ifndef CONFIG_USE_MUSL
+  TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
+  LDLIBS += tirpc
+endif
+endif
+
 ifeq ($(BUILD_VARIANT),selinux)
   LDLIBS += selinux sepol
 endif




More information about the lede-commits mailing list