summaryrefslogtreecommitdiffstats
path: root/config/statx-syscall.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-18 17:30:08 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-19 15:50:45 -0400
commitd7130b3eee3e59f2e5475bbac5695cee54310c20 (patch)
tree07889c253703bf3994af630bbbe9c5ad81e8ca80 /config/statx-syscall.c
parent2d4ff1dcd044c09dd6368b6726d53b4f3afcd546 (diff)
downloadbfs-d7130b3eee3e59f2e5475bbac5695cee54310c20.tar.xz
config: Check for statx()
Diffstat (limited to 'config/statx-syscall.c')
-rw-r--r--config/statx-syscall.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/statx-syscall.c b/config/statx-syscall.c
new file mode 100644
index 0000000..87ec869
--- /dev/null
+++ b/config/statx-syscall.c
@@ -0,0 +1,13 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <fcntl.h>
+#include <linux/stat.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+int main(void) {
+ struct statx sb;
+ syscall(SYS_statx, AT_FDCWD, ".", 0, STATX_BASIC_STATS, &sb);
+ return 0;
+}