Index: usr/src/nv/conftest.sh =================================================================== --- usr/src/nv/conftest.sh +++ usr/src/nv/conftest.sh 2010-01-06 12:10:56.000000000 +0530 @@ -32,14 +32,14 @@ # CONFIG_XEN and CONFIG_PARAVIRT are present, text_xen() treats # the kernel as a stand-alone kernel. # - FILE="linux/autoconf.h" + FILE="generated/autoconf.h" if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then # # We are looking at a configured source tree; verify # that it's not a Xen kernel. # - echo "#include + echo "#include #if defined(CONFIG_XEN) && !defined(CONFIG_PARAVIRT) #error CONFIG_XEN defined! #endif @@ -111,7 +111,12 @@ fi } -CONFTEST_PREAMBLE="#include +CONFTEST_PREAMBLE="#include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) + #include + #else + #include + #endif #if defined(CONFIG_XEN) && \ defined(CONFIG_XEN_INTERFACE_VERSION) && !defined(__XEN_INTERFACE_VERSION__) #define __XEN_INTERFACE_VERSION__ CONFIG_XEN_INTERFACE_VERSION @@ -1294,7 +1299,7 @@ echo ""; fi fi - exit $RET +# exit $RET ;; get_uname) @@ -1316,11 +1321,11 @@ # tree or at headers shipped for a specific kernel. # Determine the kernel version using a compile check. # - FILE="linux/utsrelease.h" + FILE="generated/utsrelease.h" if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then echo "$CONFTEST_PREAMBLE - #include + #include int main() { printf(\"%s\", UTS_RELEASE); return 0; @@ -1375,7 +1380,7 @@ # RET=1 VERBOSE=$6 - FILE="linux/autoconf.h" + FILE="generated/autoconf.h" if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then # @@ -1429,7 +1434,7 @@ # RET=1 VERBOSE=$6 - FILE="linux/autoconf.h" + FILE="generated/autoconf.h" if [ -f $HEADERS/$FILE -o -f $OUTPUT/include/$FILE ]; then # Index: usr/src/nv/nv-linux.h =================================================================== --- usr/src/nv/nv-linux.h +++ usr/src/nv/nv-linux.h 2010-07-16 09:00:24.000000000 -0700 @@ -14,10 +14,14 @@ #include "nv.h" -#include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) +#include +#else +#include +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 7) # error This driver does not support 2.4 kernels older than 2.4.7!