This fixes a compilation problem I had with compiling ndiswrapper on 2.6.11-love2. Probably only with SWSUP2 enabled as a module. The error is like this:
CC [M] /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.o /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.c:1112:61: macro "kthread_run" requires 5 arguments, but only 3 given /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.c: In function `PsCreateSystemThread': /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.c:1112: error: `kthread_run' undeclared (first use in this function) /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.c:1112: error: (Each undeclared identifier is reported only once /home/phaeron/ndiswrapper-1.1/driver/ntoskernel.c:1112: error: for each function it appears in.)
The problem is that an #ifdef for SWSUP2 isn't getting picked up correctly. The right way to fix this is to fix the #ifdef, but a quick fix is like this:
diff -Naur ndiswrapper-1.1-orig/driver/ntoskernel.h ndiswrapper-1.1-mod/driver/ntoskernel.h --- ndiswrapper-1.1-orig/driver/ntoskernel.h2005-03-05 03:51:56.000000000 +0200 +++ ndiswrapper-1.1-mod/driver/ntoskernel.h2005-03-19 09:23:45.000000000 +0200 @@ -168,11 +168,11 @@- endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- define KTHREAD_RUN(a,b,c) kthread_run(a,b,0,c)
-#else
-#define KTHREAD_RUN(a,b,c) kthread_run(a,b,c)
-#endif
+//#else
+//#define KTHREAD_RUN(a,b,c) kthread_run(a,b,c)
+//#endif
- ifdef CONFIG_X86_64
- define LIN2WIN1(func, arg1)