From 681b34ea4d72a796d49005688edb1801ec555b96 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 27 Jul 2025 20:12:05 +0300 Subject: [PATCH] package/daemon: fix build with gcc 15 and musl libc daemon provides its own getopt() declaration for non-GNU libcs. This declaration is compatible with musl provided one with C standards before C23. GCC 15 defaults to C23 that makes the empty params declaration equivalent to getopt(void), which is incompatible with musl declaration. Set C standard to gnu99 to restore the previous behaviour. Fixes: https://autobuild.buildroot.org/results/cc3311c86e2b14bf9a9c1ea00056e0b290ec11a3 Signed-off-by: Baruch Siach Signed-off-by: Romain Naour --- package/daemon/daemon.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/daemon/daemon.mk b/package/daemon/daemon.mk index d7709e03ef..03f2aad649 100644 --- a/package/daemon/daemon.mk +++ b/package/daemon/daemon.mk @@ -18,7 +18,8 @@ define DAEMON_CONFIGURE_CMDS endef define DAEMON_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=c99" -C $(@D) endef define DAEMON_INSTALL_TARGET_CMDS