[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240725014157.17707-4-richard.weiyang@gmail.com>
Date: Thu, 25 Jul 2024 01:41:56 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: rppt@...nel.org,
richard.weiyang@...il.com
Cc: linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: [PATCH 4/5] memblock test: fix implicit declaration of function 'isspace'
Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named
memory at boot up") introduce usage of isspace().
In kernel source code, memblock.c include the definition by
debugfs.h/seq_file.h/string_helpers.h/ctype.h. Since it already has
ctype.h in tools, let complete the include chain to fix the build error.
Signed-off-by: Wei Yang <richard.weiyang@...il.com>
---
tools/include/linux/debugfs.h | 2 ++
tools/include/linux/seq_file.h | 2 ++
tools/include/linux/string_helpers.h | 8 ++++++++
3 files changed, 12 insertions(+)
create mode 100644 tools/include/linux/string_helpers.h
diff --git a/tools/include/linux/debugfs.h b/tools/include/linux/debugfs.h
index 4ba06140b1be..a99b0e0c5414 100644
--- a/tools/include/linux/debugfs.h
+++ b/tools/include/linux/debugfs.h
@@ -2,4 +2,6 @@
#ifndef _TOOLS_DEBUGFS_H
#define _TOOLS_DEBUGFS_H
+#include <linux/seq_file.h>
+
#endif
diff --git a/tools/include/linux/seq_file.h b/tools/include/linux/seq_file.h
index f6bc226af0c1..8614fc2ca695 100644
--- a/tools/include/linux/seq_file.h
+++ b/tools/include/linux/seq_file.h
@@ -1,6 +1,8 @@
#ifndef _TOOLS_INCLUDE_LINUX_SEQ_FILE_H
#define _TOOLS_INCLUDE_LINUX_SEQ_FILE_H
+#include <linux/string_helpers.h>
+
struct seq_file;
#endif /* _TOOLS_INCLUDE_LINUX_SEQ_FILE_H */
diff --git a/tools/include/linux/string_helpers.h b/tools/include/linux/string_helpers.h
new file mode 100644
index 000000000000..bc11a762be8c
--- /dev/null
+++ b/tools/include/linux/string_helpers.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H
+#define _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H
+
+#include <linux/ctype.h>
+
+#endif /* _TOOLS_INCLUDE_LINUX_STRING_HELPERS_H */
+
--
2.34.1
Powered by blists - more mailing lists