package/iproute2: fix build failure due to missing BR2_PACKAGE_LIBTIRPC_RPCDB

iproute2's configure script enables HAVE_RPC as soon as libtirpc is
found, and misc/ss.c then calls getrpcbynumber() from its RPC service
resolver. Since the bump of libtirpc to version 1.3.7 in Buildroot
commit 3f3d6e43de, which includes upstream
commit:
https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=7cea8ad66aecc21e6caae330b5d31075af399193
that symbol is only exported when libtirpc is configured with
--enable-rpcdb. On non-glibc toolchains there is no libc fallback
either, so linking ss fails:

  ld: ss.o: in function `init_service_resolver':
  ss.c:(.text+0x2558): undefined reference to `getrpcbynumber'

Select BR2_PACKAGE_LIBTIRPC_RPCDB when libtirpc is enabled, like lsof
and other users of these functions already do.

Fixes:
https://autobuild.buildroot.org/results/390b7ed00da20c2349fe069ade4a65404834a484/

Fixes: 3f3d6e43de ("package/libtirpc: bump to version 1.3.7")
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit fc23067ac6)
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
This commit is contained in:
Yegor Yefremov
2026-09-22 15:26:48 +02:00
committed by Raphaël Mélotte
parent a6a37ba0db
commit 500860e2f0

View File

@@ -2,6 +2,7 @@ config BR2_PACKAGE_IPROUTE2
bool "iproute2"
depends on BR2_USE_MMU # fork()
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 # __kernel_{u,}long_t
select BR2_PACKAGE_LIBTIRPC_RPCDB if BR2_PACKAGE_LIBTIRPC
help
Kernel routing and traffic control utilities. Provides things
like ip and tc.