Hello,

This works on Fedora 13 running 2.6.35.8 SMP kernel.  The second patch is based
on patches 2/12 and 3/12 that Joonwoo released.  I had to add the 
NETREG_REGISTERED patch due to scoping issues when an enum declared in
net_device is used.  Otherwise, the code is same as in github master branch.  I
am not sure if there is a more elegant way to solve that issue.

Roman

diff --git a/linuxmodule/proclikefs.c b/linuxmodule/proclikefs.c
index 1e4710b..1a7d95e 100644
--- a/linuxmodule/proclikefs.c
+++ b/linuxmodule/proclikefs.c
@@ -19,7 +19,6 @@
 
 #undef CLICK_LINUXMODULE
 #include <linux/version.h>
-#include <linux/autoconf.h>
 #ifndef EXPORT_SYMTAB
 # define EXPORT_SYMTAB
 #endif
diff --git a/linuxmodule/fixincludes.pl b/linuxmodule/fixincludes.pl
index 4f48e05..590fbb4 100755
--- a/linuxmodule/fixincludes.pl
+++ b/linuxmodule/fixincludes.pl
@@ -208,9 +208,24 @@ sub one_includeroot ($$) {
            if ($d eq "sched.h") {
                s<^(extern char 
___assert_task_state)((?:.*?\n)*?.*?\;.*)$><\#ifndef 
__cplusplus\n$1$2\n\#endif>mg;
            }
+           if ($d eq "netdevice.h") {
+                s<(NETREG_REGISTERED\))><\n\#ifndef 
__cplusplus\n$1\n\#else\nnet_device::$1\n\#endif)>g;
+
+            }
+            if ($d eq "rcupdate.h") {
+               s{(^static inline notrace)(.+)}{"$1$2;\nstatic inline$2"}emg;
+           }
+           if ($d eq "kobject.h") {
+               s{(^\#include \<linux\/sysfs.h\>(.*\n)*)(^enum 
kobj_ns_type\s\{\n([^\}].*\n)*\}\;)((.*\n)*)}{"$3\n$1\/*\n$3\n*\/$5"}emg;
+           }
+
 
            # unquote.
            $_ = sunprotect($_);
+            # "new" and other keywords in inline assembler
+            s{(\basm\b.*)+(".*?[^\\])(\bnew\b)(.*")}{$1$2new_value$4}g;
+           s{(\basm\b.*)+(".*?[^\\])(\band\b)(.*")}{$1$2and_value$4}g;
+           s{(\basm\b.*)+(".*?[^\\])(\bswap\b)(.*")}{$1$2swap_value$4}g;
 
            # perhaps nothing has changed; avoid changing the timestamp
            if (-f "$outputroot$dd/$d") {
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to