File NVIDIA_kernel-define_linux.diff of Package nvidia-gfx

--- Makefile.kbuild	2013/02/19 14:46:14	1.1
+++ Makefile.kbuild	2013/02/19 14:46:24
@@ -75,7 +75,7 @@
 #
 
 EXTRA_CFLAGS += -I$(src)
-EXTRA_CFLAGS += -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -mcmodel=kernel -mno-red-zone -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
+EXTRA_CFLAGS += -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -mcmodel=kernel -mno-red-zone -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error -D__linux__
 
 #
 # We rely on these two definitions below; if they aren't set, we set them to
--- Makefile.nvidia	2013/02/19 14:46:26	1.1
+++ Makefile.nvidia	2013/02/19 14:46:29
@@ -10,7 +10,7 @@
 OBJECTS=nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o 
 HEADERS=os-agp.h os-interface.h nv-linux.h nv-misc.h nv-memdbg.h nv-vm.h nv.h rmretval.h cpuopsys.h nvtypes.h nvreadme.h $(VERSION_HDR) conftest.h patches.h
 
-CFLAGS=-Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -mcmodel=kernel -mno-red-zone -UDEBUG -U_DEBUG -DNDEBUG -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error
+CFLAGS=-Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -mcmodel=kernel -mno-red-zone -UDEBUG -U_DEBUG -DNDEBUG -MD $(DEFINES) $(INCLUDES) -Wsign-compare -Wno-cast-qual -Wno-error -D__linux__
 
 CORE_OBJECTS=nv-kernel.o
 
--- conftest.sh	2013/02/19 14:46:31	1.1
+++ conftest.sh	2013/02/19 14:47:12
@@ -128,6 +128,7 @@
         if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
             MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
             MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+	    MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/arch/x86/include/uapi"
         fi
         if [ "$XEN_PRESENT" != "0" ]; then
             MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
@@ -137,6 +138,7 @@
         if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
             MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
             MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+	    MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/arch/x86/include/uapi"
         fi
         if [ "$XEN_PRESENT" != "0" ]; then
             MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
@@ -144,9 +146,11 @@
     fi
 
     CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+    CFLAGS="$CFLAGS -I$HEADERS/uapi"
 
     if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
         CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
+	CFLAGS="$CFLAGS -I$OUTPUT/arch/x86/include/generated/uapi"
     fi
     if [ -n "$BUILD_PARAMS" ]; then
         CFLAGS="$CFLAGS -D$BUILD_PARAMS"
--- nv-linux.h	2013/02/19 14:47:14	1.1
+++ nv-linux.h	2013/02/19 14:47:28
@@ -64,6 +64,18 @@
 #include <linux/module.h>
 #include <linux/kmod.h>
 
+#include <linux/mm.h>
+
+#if !defined(VM_RESERVED)
+#define VM_RESERVED    0x00000000
+#endif
+#if !defined(VM_DONTEXPAND)
+#define VM_DONTEXPAND  0x00000000
+#endif
+#if !defined(VM_DONTDUMP)
+#define VM_DONTDUMP    0x00000000
+#endif
+
 #include <linux/init.h>             /* module_init, module_exit         */
 #include <linux/types.h>            /* pic_t, size_t, __u32, etc        */
 #include <linux/errno.h>            /* error codes                      */
openSUSE Build Service is sponsored by