summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 19:14:42 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 14:45:33 +0100
commitf5eae2dee077ee8f78324efcbee2977482329249 (patch)
tree79319a465c02b4d25f9c92fac9afb1ce67c0b7e1
parentc35ca31451ef96e005a4e0545f7cf00650d67152 (diff)
tools/testing/selftests/landlock/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--tools/testing/selftests/landlock/common.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/landlock/common.h b/tools/testing/selftests/landlock/common.h
index 20e2a9286d71..cac1caded5a5 100644
--- a/tools/testing/selftests/landlock/common.h
+++ b/tools/testing/selftests/landlock/common.h
@@ -7,7 +7,9 @@
* Copyright © 2021 Microsoft Corporation
*/
+
#include <errno.h>
+#include <linux/array_size.h>
#include <linux/landlock.h>
#include <sys/capability.h>
#include <sys/syscall.h>
@@ -17,9 +19,6 @@
#include "../kselftest_harness.h"
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
/*
* TEST_F_FORK() is useful when a test drop privileges but the corresponding