c++ doesn't allow an array with variable size. avoid build error below: click/click/include/click-linuxmodule/include1/linux/sched.h:200: error: array bound is not an integer constant
Signed-off-by: Joonwoo Park <[email protected]> --- linuxmodule/fixincludes.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/linuxmodule/fixincludes.pl b/linuxmodule/fixincludes.pl index 4088643..04efb69 100755 --- a/linuxmodule/fixincludes.pl +++ b/linuxmodule/fixincludes.pl @@ -199,7 +199,7 @@ sub one_includeroot ($$) { if ($d eq "mpspec.h") { s<^\#define\s+(\w+)\s+\{\s*\{\s*\[\s*0\s*\.\.\.\s*(\w+)\s*-\s*1\s*\]\s*=\s*(.*?)\s*\}\s*\}><expand_array_initializer($1, $2, $3)>emg; } - if ($d eq "kernel.h") { + if ($d eq "kernel.h" or $d eq "sched.h") { # BUILD_BUG_ON_* cannot define a struct inside sizeof(). # Rather than negative-bitfield size, produce a negative # array dimension. @@ -214,6 +214,9 @@ sub one_includeroot ($$) { if ($d eq "netdevice.h") { s{(.*)(\(.*\b)(NETREG_.+)(\b\))}{#ifdef __cplusplus\n$1$2net_device::$3$4\n#else\n$1$2$3$4\n#endif}g; } + if ($d eq "sched.h") { + s<(^extern char ___assert_task_state)((.+\n)*.*(\;))><\#ifndef __cplusplus\n$1$2\n\#endif>mg; + } # unquote. $_ = sunprotect($_); -- 1.7.0.4 _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
