error-injection: Include definitions for bool and true/false
PATCH 1/1 error-injection: Include definitions for bool and true/false
If error injection user hasn't included definitions for bool and true/false, kernel may not compile under certain case, just like:
All errors (new ones prefixed by >>):
In file included from fs//btrfs/tree-checker.c:18:
Quoted 1 line
Quoted 1 line
include/linux/error-injection.h:15:15: error: unknown type name 'bool'
static inline bool within_error_injection_list(unsigned long addr)
^~~~
include/linux/error-injection.h: In function 'within_error_injection_list':
Quoted 1 line
Quoted 1 line
include/linux/error-injection.h:17:9: error: 'false' undeclared (first use in this function)
return false;
^~~~~
include/linux/error-injection.h:17:9: note: each undeclared identifier is reported only once for each function it appears inAnyway the fix is straightforward, include <linux/types.h> for bool and <linux/stddef.h> for true/false in error-injection.h to make it self contained.
--- include/linux/error-injection.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/error-injection.h +2 -0
@@ -2,6 +2,8 @@#ifndef _LINUX_ERROR_INJECTION_H#define _LINUX_ERROR_INJECTION_H +#include <linux/types.h> /* for bool */ +#include <linux/stddef.h> /* for true/false */ #ifdef CONFIG_FUNCTION_ERROR_INJECTION #include <asm/error-injection.h>
Signature · 1 line
2.21.0