summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-10 14:39:07 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-12 17:22:18 -0300
commitc5429ac2d1f03b91dcb3dd8ba0a970eac433414f (patch)
tree774b2dab97f1db80ed4ab07ee28b666d3f8fd4a6 /tools
parent9d527dc79e6bac6b984f53c2e9a64ab5412ca725 (diff)
tools build: Fix timerfd feature detection with clang
Clang's uninitialized-const-pointer warning causes a feature test to fail when building perf with clang. This disables support for 'perf kvm stat live'. Add default initialization to new_value as a workaround. test-timerfd.c:15:30: error: variable 'new_value' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 15 | if (timerfd_settime(fd, 0, &new_value, NULL) != 0) | ^~~~~~~~~ 1 error generated. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20260910213907.3206529-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/build/feature/test-timerfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build/feature/test-timerfd.c b/tools/build/feature/test-timerfd.c
index 9c72c697a9df..f88e8cc63ef3 100644
--- a/tools/build/feature/test-timerfd.c
+++ b/tools/build/feature/test-timerfd.c
@@ -6,7 +6,7 @@
int main(void)
{
- struct itimerspec new_value;
+ struct itimerspec new_value = {};
int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
if (fd < 0)