summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-04-09 09:58:59 -0600
committerJens Axboe <axboe@kernel.dk>2020-04-09 09:58:59 -0600
commit802b9a245d0fe210f3181ff74a1df05a6bd3afb8 (patch)
tree70060d34d13d081210eebd26554a1b7806ef3d0b /configure
parent3d70675e33ba476274b86c378e5cd2195a861879 (diff)
downloadliburing-802b9a245d0fe210f3181ff74a1df05a6bd3afb8.tar.gz
liburing-802b9a245d0fe210f3181ff74a1df05a6bd3afb8.tar.bz2
configure: check for struct statx
If not there, don't build the test program test/statx Fixes: https://github.com/axboe/liburing/issues/101 Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 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