summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/header.mk4
-rw-r--r--config/statx-syscall.c13
-rw-r--r--config/statx.c11
3 files changed, 27 insertions, 1 deletions
diff --git a/config/header.mk b/config/header.mk
index 20cb7ae..ec53dfa 100644
--- a/config/header.mk
+++ b/config/header.mk
@@ -17,7 +17,9 @@ HEADERS := \
${GEN}/getprogname.h \
${GEN}/getprogname-gnu.h \
${GEN}/posix-spawn-addfchdir.h \
- ${GEN}/posix-spawn-addfchdir-np.h
+ ${GEN}/posix-spawn-addfchdir-np.h \
+ ${GEN}/statx.h \
+ ${GEN}/statx-syscall.h
${GEN}/config.h: ${HEADERS}
${MSG} "[ GEN] ${TGT}"
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;
+}
diff --git a/config/statx.c b/config/statx.c
new file mode 100644
index 0000000..65f1674
--- /dev/null
+++ b/config/statx.c
@@ -0,0 +1,11 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <fcntl.h>
+#include <sys/stat.h>
+
+int main(void) {
+ struct statx sb;
+ statx(AT_FDCWD, ".", 0, STATX_BASIC_STATS, &sb);
+ return 0;
+}