summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 19:17:08 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 17:04:53 +0100
commit741ab0a90e358a4d5e529911e622a71aa67a021d (patch)
tree5e0076aa79a6192299f4fe962a16a9e469871b2b
parent8abc6c354eb942a2f35f2e1d925af812102e64ad (diff)
tools/include/linux/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--tools/include/linux/kernel.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 51e7fd8853d4..1dc6de4924a3 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -2,15 +2,18 @@
#ifndef __TOOLS_LINUX_KERNEL_H
#define __TOOLS_LINUX_KERNEL_H
+
#include <stdarg.h>
#include <stddef.h>
#include <assert.h>
+#include <linux/array_size.h>
#include <linux/build_bug.h>
#include <linux/compiler.h>
#include <linux/offsetof.h>
#include <endian.h>
#include <byteswap.h>
+
#ifndef UINT_MAX
#define UINT_MAX (~0U)
#endif
@@ -99,8 +102,6 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
int scnprintf(char * buf, size_t size, const char * fmt, ...);
int scnprintf_pad(char * buf, size_t size, const char * fmt, ...);
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-
/*
* This looks more complex than it should be. But we need to
* get the type for the ~ right in round_down (it needs to be