* [Buildroot] [PATCH 1/1] package/atf: fix build with newer gcc
@ 2025-11-22 22:53 Bernd Kuhls
2026-01-01 22:24 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2025-11-22 22:53 UTC (permalink / raw)
To: buildroot; +Cc: Dario Binacchi
Buildroot commit d6c3257e931ed256e3ebcd78938f6146bba8586f bumped the
package from 0.21 to 0.23. Upstream release 0.22 includes commit
https://github.com/freebsd/atf/commit/d7c7c53c0626ab59a62aa4efcf05323b3621baa9
which uses CLOCK_MONOTONIC without including time.h.
Fixes:
https://autobuild.buildroot.net/results/41b/41b25ee8e66e34323eca011e4b5fe479ece9ed76/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0001-atf-check.cpp-include-time.h.patch | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/atf/0001-atf-check.cpp-include-time.h.patch
diff --git a/package/atf/0001-atf-check.cpp-include-time.h.patch b/package/atf/0001-atf-check.cpp-include-time.h.patch
new file mode 100644
index 0000000000..9207602382
--- /dev/null
+++ b/package/atf/0001-atf-check.cpp-include-time.h.patch
@@ -0,0 +1,33 @@
+From 67e7d350a15aff88c151b1fc838dac83d35be955 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sat, 22 Nov 2025 23:47:41 +0100
+Subject: [PATCH] atf-check.cpp: include time.h
+
+Fixes build error with gcc 14 as reported by the buildroot autobuilders:
+https://autobuild.buildroot.net/results/41b/41b25ee8e66e34323eca011e4b5fe479ece9ed76/build-end.log
+
+atf-sh/atf-check.cpp: In function 'useconds_t get_monotonic_useconds()':
+atf-sh/atf-check.cpp:183:24: error: 'CLOCK_MONOTONIC' was not declared in this scope
+
+Upstream: https://github.com/freebsd/atf/pull/108
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ atf-sh/atf-check.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/atf-sh/atf-check.cpp b/atf-sh/atf-check.cpp
+index 1354e3a..94da413 100644
+--- a/atf-sh/atf-check.cpp
++++ b/atf-sh/atf-check.cpp
+@@ -30,6 +30,7 @@ extern "C" {
+ #include <limits.h>
+ #include <signal.h>
+ #include <stdint.h>
++#include <time.h>
+ #include <unistd.h>
+ }
+
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/atf: fix build with newer gcc
2025-11-22 22:53 [Buildroot] [PATCH 1/1] package/atf: fix build with newer gcc Bernd Kuhls
@ 2026-01-01 22:24 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-01 22:24 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, Dario Binacchi
Hello Bernd,
On Sat, 22 Nov 2025 23:53:14 +0100
Bernd Kuhls <bernd@kuhls.net> wrote:
> diff --git a/package/atf/0001-atf-check.cpp-include-time.h.patch b/package/atf/0001-atf-check.cpp-include-time.h.patch
> new file mode 100644
> index 0000000000..9207602382
> --- /dev/null
> +++ b/package/atf/0001-atf-check.cpp-include-time.h.patch
> @@ -0,0 +1,33 @@
> +From 67e7d350a15aff88c151b1fc838dac83d35be955 Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd@kuhls.net>
> +Date: Sat, 22 Nov 2025 23:47:41 +0100
> +Subject: [PATCH] atf-check.cpp: include time.h
> +
> +Fixes build error with gcc 14 as reported by the buildroot autobuilders:
> +https://autobuild.buildroot.net/results/41b/41b25ee8e66e34323eca011e4b5fe479ece9ed76/build-end.log
Do you have a minimal reproducer, preferably with an external
toolchain? I built atf successfully with gcc 14.x uClibc and glibc
toolchains (Bootlin toolchains). The file atf-check.cpp was built
successfully, so I'm curious to understand what makes a difference.
Thanks,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-01 22:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-22 22:53 [Buildroot] [PATCH 1/1] package/atf: fix build with newer gcc Bernd Kuhls
2026-01-01 22:24 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox