[PATCH 1/3] libapi: Add missing header with NAME_MAX define to io_dir.h
From: Arnaldo Carvalho de Melo
Date: Mon Mar 10 2025 - 15:45:58 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Most systems get this indirectly, but some odd cases (some musl libc
systems) can't find it, so just add the header where NAME_MAX is defined
to avoid that.
Fixes: d118b08f7eee6d6f ("tools lib api: Add io_dir an allocation free readdir alternative")
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Ian Rogers <irogers@xxxxxxxxxx>
Cc: James Clark <james.clark@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/lib/api/io_dir.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/api/io_dir.h b/tools/lib/api/io_dir.h
index aab73393d2a217ab..ef83e967e48c59f7 100644
--- a/tools/lib/api/io_dir.h
+++ b/tools/lib/api/io_dir.h
@@ -11,6 +11,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/syscall.h>
+#include <linux/limits.h>
#if !defined(SYS_getdents64)
#if defined(__x86_64__) || defined(__arm__)
--
2.48.1