libapi: Add missing header with NAME_MAX define to io_dir.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Mar 2025 19:45:31 +0000 (16:45 -0300)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 13 Mar 2025 07:29:36 +0000 (00:29 -0700)
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")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20250310194534.265487-2-acme@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/lib/api/io_dir.h

index aab73393d2a217ab8386c8fe1b196f1d5d4c72c2..ef83e967e48c59f729b62164fae6e706180ce658 100644 (file)
@@ -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__)