tools/liblockdep: Fix compilation error.
PATCH 1/1 tools/liblockdep: Fix compilation error.
Currently, liblockdep has compilation error with following log messages.
CC common.o
CC lockdep.o
In file included from lockdep.c:10:../../../kernel/locking/lockdep.c: In function 'count_matching_names':../../../kernel/locking/lockdep.c:650: error: 'lock_entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:650: error: (Each undeclared identifier is reported only once ../../../kernel/locking/lockdep.c:650: error: for each function it appears in.) ../../../kernel/locking/lockdep.c:650: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c: In function 'look_up_lock_class':../../../kernel/locking/lockdep.c:722: error: 'hash_entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:722: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c: In function 'register_lock_class':../../../kernel/locking/lockdep.c:777: error: 'hash_entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:777: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c: In function '__bfs':../../../kernel/locking/lockdep.c:1039: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c: In function 'lookup_chain_cache':../../../kernel/locking/lockdep.c:2036: error: 'entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:2036: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c:2063: error: label 'cache_hit' used but not defined In file included from lockdep.c:10:../../../kernel/locking/lockdep.c: In function 'lockdep_free_key_range':../../../kernel/locking/lockdep.c:3937: error: 'hash_entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:3937: error: expected ';' before '{' token ../../../kernel/locking/lockdep.c: In function 'lockdep_reset_lock':../../../kernel/locking/lockdep.c:3994: error: 'hash_entry' undeclared (first use in this function) ../../../kernel/locking/lockdep.c:3994: error: expected ';' before '{' token
This patch fixes this compilation error.
--- tools/lib/lockdep/lockdep.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
tools/lib/lockdep/lockdep.c +6 -0
@@ -1,2 +1,8 @@#include <linux/lockdep.h> + +#ifdef list_for_each_entry_rcu +#undef list_for_each_entry_rcu +#endif +#define list_for_each_entry_rcu (pos, head, member) list_for_each_entry(pos, head, member) +#include "../../../kernel/locking/lockdep.c"
Signature · 3 lines
1.7.0.1
�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m����띠�◀?뻀�tools/lib/lockdep/lockdep.c line 8
Quoted 13 lines · Eunbong Song
tools/lib/lockdep/lockdep.c +6
-0@@ -1,2 +1,8 @@#include <linux/lockdep.h> + +#ifdef list_for_each_entry_rcu +#undef list_for_each_entry_rcu +#endif +#define list_for_each_entry_rcu (pos, head, member) list_for_each_entry(pos, head, member) +#include "../../../kernel/locking/lockdep.c"
I'd rather have it pull include/linux/rculist.h and "fix" it up for userspace like we did for the rest of the headers rather than start adding exceptions in the main program code.
Thanks,
Sasha