package/atf: fix non-threaded build
PATCH v2 1/1 package/atf: fix non-threaded build
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/
Two minimal defconfigs to reproduce the build error:
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_GCC_VERSION_13_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=y
All defconfigs of the build errors recorded by the buildroot autobuilders contain BR2_PTHREADS_NONE=y.
---
v2: updated subject, build error is unrelated to gcc version (Thomas)
.../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
package/atf/0001-atf-check.cpp-include-time.h.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 67e7d350a15aff88c151b1fc838dac83d35be955 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +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/commit/67e7d350a15aff88c151b1fc838dac83d35be955 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + 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 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedHello Bernd,
Quoted 21 lines · On Fri, 2 Jan 2026 16:43:42 +0100 Bernd Kuhls <[email protected]> wrote:
Buildroot commit
d6c3257e931ed256e3ebcd78938f6146bba8586fbumped the package from 0.21 to 0.23. Upstream release 0.22 includes commit
https://github.com/freebsd/atf/commit/d7c7c53c0626ab59a62aa4efcf05323b3621baa9
which usesCLOCK_MONOTONICwithout includingtime.h.Fixes:
https://autobuild.buildroot.net/results/41b/41b25ee8e66e34323eca011e4b5fe479ece9ed76/Two minimal defconfigs to reproduce the build error:
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=yBR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_GCC_VERSION_13_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=y
Quoted 4 lines
All defconfigs of the build errors recorded by the buildroot autobuilders contain BR2_PTHREADS_NONE=y.
Signed-off-by Bernd Kuhls <[email protected]>
Thanks, applied!
package/atf/0001-atf-check.cpp-include-time.h.patch line 6
Quoted 12 lines
package/atf/0001-atf-check.cpp-include-time.h.patch new file +6
-0@@ -0,0 +1,33 @@ +From 67e7d350a15aff88c151b1fc838dac83d35be955 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +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:
Note that this is therefore incorrect, but since that's how the patch has been merged upstream, I left it as-is.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
In reply of:
Quoted 21 lines
Buildroot commit
d6c3257e931ed256e3ebcd78938f6146bba8586fbumped the package from 0.21 to 0.23. Upstream release 0.22 includes commit
https://github.com/freebsd/atf/commit/d7c7c53c0626ab59a62aa4efcf05323b3621baa9
which usesCLOCK_MONOTONICwithout includingtime.h.Fixes:
https://autobuild.buildroot.net/results/41b/41b25ee8e66e34323eca011e4b5fe479ece9ed76/Two minimal defconfigs to reproduce the build error:
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=yBR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_GCC_VERSION_13_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_ATF=y
Quoted 4 lines
All defconfigs of the build errors recorded by the buildroot autobuilders contain BR2_PTHREADS_NONE=y.
Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.11.x. Thanks
Quoted 53 lines
---
v2: updated subject, build error is unrelated to gcc version (Thomas).../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.patchpackage/atf/0001-atf-check.cpp-include-time.h.patch new file +33
-0@@ -0,0 +1,33 @@ +From 67e7d350a15aff88c151b1fc838dac83d35be955 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +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/commit/67e7d350a15aff88c151b1fc838dac83d35be955 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + 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 +Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot