[PATCH] tools/power turbostat: Fix build with musl

From: Calvin Owens
Date: Fri Jun 13 2025 - 12:55:16 EST


turbostat.c: In function 'parse_int_file':
turbostat.c:5567:19: error: 'PATH_MAX' undeclared (first use in this function)
5567 | char path[PATH_MAX];
| ^~~~~~~~

turbostat.c: In function 'probe_graphics':
turbostat.c:6787:19: error: 'PATH_MAX' undeclared (first use in this function)
6787 | char path[PATH_MAX];
| ^~~~~~~~

Signed-off-by: Calvin Owens <calvin@xxxxxxxxxx>
---
tools/power/x86/turbostat/turbostat.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 0170d3cc6819..925556b90770 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -67,6 +67,7 @@
#include <stdbool.h>
#include <assert.h>
#include <linux/kernel.h>
+#include <limits.h>

#define UNUSED(x) (void)(x)

--
2.47.2