Skip to contentSkip to conversation

package/xinetd: fix build with musl

PATCH Applied Aaron Sierra 3 participants 3 messages Jul 16, 2025 – Aug 14, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 package/xinetd/xinetd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/xinetd/xinetd.mk +5 -0
index f58c26f02a..f63a8a2251 100644
@@ -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)"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Aaron" == Aaron Sierra <[email protected]> writes:

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.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Aaron Sierra

In reply of:

Quoted 5 lines

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.

Applied to 2025.02.x & 2025.05.x. Thanks

Quoted 27 lines
---
 package/xinetd/xinetd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/xinetd/xinetd.mk +5 -0
index f58c26f02a..f63a8a2251 100644
@@ -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)"
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot