diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-19 19:13:58 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-20 14:45:33 +0100 |
commit | 4973f19407f08749303f3ad8671c50f292efd9c6 (patch) | |
tree | 7927f7a7aa23c01adff6203b0c2f3d2acaadd974 | |
parent | ecaee90a1b3ca377a993aee78b43d106dd20f9a0 (diff) |
tools/testing/selftests/seccomp/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r-- | tools/testing/selftests/seccomp/seccomp_benchmark.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c index 6e5102a7d7c9..cbe89c35ee0e 100644 --- a/tools/testing/selftests/seccomp/seccomp_benchmark.c +++ b/tools/testing/selftests/seccomp/seccomp_benchmark.c @@ -2,6 +2,8 @@ * Strictly speaking, this is not a test. But it can report during test * runs so relative performace can be measured. */ + + #define _GNU_SOURCE #include <assert.h> #include <limits.h> @@ -11,6 +13,7 @@ #include <stdlib.h> #include <time.h> #include <unistd.h> +#include <linux/array_size.h> #include <linux/filter.h> #include <linux/seccomp.h> #include <sys/param.h> @@ -18,7 +21,6 @@ #include <sys/syscall.h> #include <sys/types.h> -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) unsigned long long timing(clockid_t clk_id, unsigned long long samples) { |