]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fincore: include sys/syscall.h if available
authorXi Ruoyao <xry111@xry111.site>
Sat, 20 Jun 2026 18:02:41 +0000 (02:02 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sat, 20 Jun 2026 18:04:52 +0000 (02:04 +0800)
Without sys/syscall.h, we fall back to the hand-brew logic for
SYS_cachestat.  The hand-brew code has a special case for Alpha, but
there are more cases where cachestat has a different syscall number, for
example MIPS.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
misc-utils/fincore.c

index 366aa6f3ca63a06c464474e0f8a67dcd48ce06cc..5603de59b791c30debff497cf72741c63e43a5f1 100644 (file)
@@ -20,6 +20,9 @@
 
 #include <sys/mman.h>
 #include <sys/stat.h>
+#ifdef HAVE_SYS_SYSCALL_H
+#include <sys/syscall.h>
+#endif
 #include <unistd.h>
 #include <getopt.h>
 #include <stdio.h>