From: Dmitry V. Levin Date: Tue, 16 Jul 2019 17:46:47 +0000 (+0000) Subject: tests: robustify statx test X-Git-Tag: v5.3~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d63fdc1bd06806e07f186e1135714b6a201d84d;p=strace tests: robustify statx test Do not assume that defines struct statx. * configure.ac (AC_CHECK_TYPES): Check for struct statx in . * tests/statx.c: Conditionalize on HAVE_STRUCT_STATX along with __NR_statx. --- diff --git a/configure.ac b/configure.ac index 624fc7c0..3394357b 100644 --- a/configure.ac +++ b/configure.ac @@ -556,6 +556,9 @@ AC_CHECK_TYPES([struct statfs64], [ ],, [#include #include ]) +AC_CHECK_TYPES([struct statx],,, [#include +#include ]) + AC_CHECK_TYPES([struct blk_user_trace_setup],,, [#include ]) AC_CHECK_TYPES([struct mtd_write_req],,, [#include ]) diff --git a/tests/statx.c b/tests/statx.c index c5e86ad2..e0815b74 100644 --- a/tests/statx.c +++ b/tests/statx.c @@ -8,7 +8,7 @@ #include "tests.h" #include -#ifdef __NR_statx +#if defined __NR_statx && defined HAVE_STRUCT_STATX # include # include "xlat.h" @@ -45,6 +45,6 @@ static const char *TEST_SYSCALL_STATX_MASK_STR = "STATX_ALL"; #else -SKIP_MAIN_UNDEFINED("__NR_statx") +SKIP_MAIN_UNDEFINED("__NR_statx && HAVE_STRUCT_STATX") #endif