--- modules/mga-vid.orig/mga_vid.c 2010-05-18 14:16:10.000000000 +0100 +++ modules/mga-vid/mga_vid.c 2013-12-16 00:01:08.000000000 +0000 @@ -52,6 +52,16 @@ #include #include #include +/* + * VM_RESERVED is not in kernels >= 3.7 + * Bug fix cribbed from: + * http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/2013-January/008414.html + * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=314e51b9851b4f4e8ab302243ff5a6fc6147f379 + * + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) +#define VM_RESERVED (VM_IO | VM_DONTEXPAND | VM_DONTDUMP) +#endif #include #include @@ -70,7 +80,15 @@ #endif #include +/* + * asm/system.h is not in kernels >= 3.4 + * Bug fix cribbed from: + * https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/993506 + * + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) #include +#endif #include #ifndef PCI_DEVICE_ID_MATROX_G200_PCI