From 8bd2be012e6cb669940a09f1bd539e1a8cb929b8 Mon Sep 17 00:00:00 2001 From: Aaron Sierra Date: Wed, 16 Jul 2025 13:56:25 -0500 Subject: [PATCH] package/xinetd: fix build with musl The ecvt(), fcvt(), and gcvt() functions from stdlib.h, used by the SIO library packaged with the xinetd sources, are masked by _GNU_SOURCE in musl libc. Signed-off-by: Aaron Sierra Signed-off-by: Peter Korsgaard (cherry picked from commit 2982fac48ede2c14e86df670fc4e44399d0a3f69) Signed-off-by: Thomas Perale --- package/xinetd/xinetd.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk index f58c26f02a..f63a8a2251 100644 --- a/package/xinetd/xinetd.mk +++ b/package/xinetd/xinetd.mk @@ -29,6 +29,11 @@ else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),) XINETD_CFLAGS += -DNO_RPC endif +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +# Make ecvt(), fcvt(), and gcvt() available for SIO library +XINETD_CFLAGS += -D_GNU_SOURCE +endif + XINETD_CONF_ENV += \ CFLAGS="$(XINETD_CFLAGS)" \ LIBS="$(XINETD_LIBS)"