summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure24
-rw-r--r--test/Makefile12
2 files changed, 34 insertions, 2 deletions
diff --git a/configure b/configure
index e32b859..30b0a5a 100755
--- a/configure
+++ b/configure
@@ -245,6 +245,27 @@ if compile_prog "" "" "open_how"; then
fi
print_config "open_how" "$open_how"
+##########################################
+# check for statx
+statx="no"
+cat > $TMPC << EOF
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <linux/stat.h>
+int main(int argc, char **argv)
+{
+ struct statx x;
+
+ return memset(&x, 0, sizeof(x)) != NULL;
+}
+EOF
+if compile_prog "" "" "statx"; then
+ statx="yes"
+fi
+print_config "statx" "$statx"
#############################################################################
@@ -257,6 +278,9 @@ fi
if test "$open_how" = "yes"; then
output_sym "CONFIG_HAVE_OPEN_HOW"
fi
+if test "$statx" = "yes"; then
+ output_sym "CONFIG_HAVE_STATX"
+fi
echo "CC=$cc" >> $config_host_mak
diff --git a/test/Makefile b/test/Makefile
index f8baa46..ff4d4b8 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -18,7 +18,7 @@ all_targets += poll poll-cancel ring-leak fsync io_uring_setup io_uring_register
poll-link accept-link fixed-link poll-cancel-ton teardowns \
poll-many b5837bd5311d-test accept-test d77a67ed5f27-test \
connect 7ad0e4b2f83c-test submit-reuse fallocate open-close \
- file-update statx accept-reuse poll-v-poll fadvise madvise \
+ file-update accept-reuse poll-v-poll fadvise madvise \
short-read openat2 probe shared-wq personality eventfd \
send_recv eventfd-ring across-fork sq-poll-kthread splice \
lfs-openat lfs-openat-write
@@ -29,6 +29,10 @@ ifneq ($(MAKECMDGOALS),clean)
include ../config-host.mak
endif
+ifdef CONFIG_HAVE_STATX
+all_targets += statx
+endif
+
all: $(all_targets)
%: %.c
@@ -46,11 +50,15 @@ test_srcs := poll.c poll-cancel.c ring-leak.c fsync.c io_uring_setup.c \
accept-link.c fixed-link.c poll-cancel-ton.c teardowns.c poll-many.c \
b5837bd5311d-test.c accept-test.c d77a67ed5f27-test.c connect.c \
7ad0e4b2f83c-test.c submit-reuse.c fallocate.c open-close.c \
- file-update.c statx.c accept-reuse.c poll-v-poll.c fadvise.c \
+ file-update.c accept-reuse.c poll-v-poll.c fadvise.c \
madvise.c short-read.c openat2.c probe.c shared-wq.c \
personality.c eventfd.c eventfd-ring.c across-fork.c sq-poll-kthread.c \
splice.c lfs-openat.c lfs-openat-write.c
+ifdef CONFIG_HAVE_STATX
+test_srcs += statx.c
+endif
+
test_objs := $(patsubst %.c,%.ol,$(test_srcs))
35fa71a030ca-test: XCFLAGS = -lpthread