diff -ur usr/src/nv/conftest.sh NVIDIA-Linux-x86-1.0-7174-pkg1-patched/usr/src/nv/conftest.sh
--- usr/src/nv/conftest.sh	2005-03-22 16:36:23.000000000 +0100
+++ usr/src/nv/conftest.sh	2006-03-25 22:40:05.000000000 +0100
@@ -12,8 +12,8 @@
 OUTPUT=$3
 
 CFLAGS="-D__KERNEL__ \
--nostdinc -isystem $ISYSTEM \
--Werror -Wimplicit-function-declaration"
+-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
+-nostdinc -isystem $ISYSTEM"
 
 if [ "$OUTPUT" != "$SOURCES" ]; then
     CFLAGS="$CFLAGS -I$OUTPUT/include2 -I$OUTPUT/include \
@@ -29,9 +29,22 @@
         #
 
         echo "#include <linux/mm.h>
-        int nv_remap_page_range(void) {
+        void conftest_remap_page_range(void) {
+           remap_page_range();
+        }" > conftest$$.c
+
+        $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+        rm -f conftest$$.c
+
+        if [ -f conftest$$.o ]; then
+          rm -f conftest$$.o
+          exit 1
+        fi
+
+        echo "#include <linux/mm.h>
+        int conftest_remap_page_range(void) {
            pgprot_t pgprot = __pgprot(0);
-           remap_page_range(NULL, 0L, 0L, 0L, pgprot);
+           return remap_page_range(NULL, 0L, 0L, 0L, pgprot);
         }" > conftest$$.c
 
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
@@ -44,9 +57,9 @@
         fi
 
         echo "#include <linux/mm.h>
-        int nv_remap_page_range(void) {
+        int conftest_remap_page_range(void) {
            pgprot_t pgprot = __pgprot(0);
-           remap_page_range(0L, 0L, 0L, pgprot);
+           return remap_page_range(0L, 0L, 0L, pgprot);
         }" > conftest$$.c
 
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
@@ -362,8 +375,8 @@
         #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
           #include <asm/cacheflush.h>
         #endif
-        int nv_change_page_attr(struct page *pp, int i, pgprot_t prot) {
-            return change_page_attr(pp, i, prot);
+        void conftest_change_page_attr() {
+            change_page_attr();
         }" > conftest$$.c
 
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
@@ -371,9 +384,9 @@
 
         if [ -f conftest$$.o ]; then
             rm -f conftest$$.o
-            echo 1
-        else
             echo 0
+        else
+            echo 1
         fi
     ;;
 
@@ -403,21 +416,24 @@
         # Determine if class_simple_create() is present.
         #
 
-        echo "#include <linux/device.h>
-        struct class_simple*
-        nv_class_simple_create(struct module *owner, char *name) {
-            return class_simple_create(owner, name);
-        }" > conftest$$.c
-
-        $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-        rm -f conftest$$.c
+	# robo:
+	echo 0
 
-        if [ -f conftest$$.o ]; then
-            rm -f conftest$$.o
-            echo 1
-        else
-            echo 0
-        fi
+#         echo "#include <linux/device.h>
+#         struct class_simple*
+#         conftest_class_simple_create(struct module *owner, char *name) {
+#             return class_simple_create(owner, name);
+#         }" > conftest$$.c
+# 
+#         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+#         rm -f conftest$$.c
+# 
+#         if [ -f conftest$$.o ]; then
+#             rm -f conftest$$.o
+#             echo 1
+#         else
+#             echo 0
+#         fi
     ;;
 
     pci_get_class)
@@ -426,9 +442,8 @@
         #
 
         echo "#include <linux/pci.h>
-        struct pci_dev*
-        nv_pci_get_class(unsigned int class, struct pci_dev *from) {
-            return pci_get_class(class, from);
+        void conftest_pci_get_class(void) {
+            pci_get_class();
         }" > conftest$$.c
 
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
@@ -436,9 +451,9 @@
 
         if [ -f conftest$$.o ]; then
             rm -f conftest$$.o
-            echo 1
-        else
             echo 0
+        else
+            echo 1
         fi
     ;;
 
@@ -448,9 +463,8 @@
         #
 
         echo "#include <linux/mm.h>
-        int nv_remap_pfn_range(void) {
-            pgprot_t pgprot = __pgprot(0);
-            remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);
+        void conftest_remap_pfn_range(void) {
+            remap_pfn_range();
         }" > conftest$$.c
 
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
@@ -458,9 +472,9 @@
 
         if [ -f conftest$$.o ]; then
             rm -f conftest$$.o
-            echo 1
-        else
             echo 0
+        else
+            echo 1
         fi
     ;;
 
@@ -508,11 +522,11 @@
         #
 
         echo "#include <linux/sched.h>
-        struct rlimit *nv_signal_struct_rlim(void) {
+        struct rlimit *conftest_signal_struct_rlim(void) {
             return current->signal->rlim;
         }" > conftest$$.c
 
-        $CC $CFLAGS -Wno-error -c conftest$$.c > /dev/null 2>&1
+        $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
         rm -f conftest$$.c
 
         if [ -f conftest$$.o ]; then
@@ -532,7 +546,7 @@
         echo "#include <linux/types.h>
         #include <linux/agp_backend.h>
         typedef struct agp_bridge_data agp_bridge_data;
-        agp_bridge_data *nv_agp_backend_acquire(struct pci_dev *dev) {
+        agp_bridge_data *conftest_agp_backend_acquire(struct pci_dev *dev) {
             return agp_backend_acquire(dev);
         }" > conftest$$.c
 
@@ -553,9 +567,23 @@
         #
 
         echo "#include <linux/vmalloc.h>
-        void *nv_vmap(struct page **pg, int cnt) {
+        void conftest_vmap(void) {
+            vmap();
+        }" > conftest$$.c
+
+        $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+        rm -f conftest$$.c
+
+        if [ -f conftest$$.o ]; then
+            rm -f conftest$$.o
+            exit 1
+        fi
+
+        echo "#include <linux/vmalloc.h>
+        void *conftest_vmap(struct page **pg, int cnt) {
             return vmap(pg, cnt);
         }" > conftest$$.c
+
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
         rm -f conftest$$.c
 
@@ -567,9 +595,10 @@
 
         echo "#include <linux/vmalloc.h>
         #include <linux/mm.h>
-        void *nv_vmap(struct page **pg, int cnt) {
+        void *conftest_vmap(struct page **pg, int cnt) {
             return vmap(pg, cnt, 0, PAGE_KERNEL);
         }" > conftest$$.c
+
         $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
         rm -f conftest$$.c
 
@@ -577,6 +606,10 @@
             rm -f conftest$$.o
             echo 4
         else
-            exit 1  # there ain't no vmap()
+            #
+            # We couldn't determine the number of arguments expected by the
+            # vmap() function.
+            #
+            exit 1
         fi
 esac

