--- kernel/conftest.sh.orig 2017-07-04 19:34:18.849964147 +0200 +++ kernel/conftest.sh 2017-07-04 19:40:00.084349448 +0200 @@ -362,7 +362,11 @@ # Determine if the set_memory_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_memory_uc(void) { set_memory_uc(); }" @@ -375,7 +379,11 @@ # Determine if the set_memory_array_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_memory_array_uc(void) { set_memory_array_uc(); }" @@ -388,7 +396,11 @@ # Determine if the set_pages_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_pages_uc(void) { set_pages_uc(); }" --- kernel/uvm/conftest.sh.orig 2017-07-04 19:41:43.317660686 +0200 +++ kernel/uvm/conftest.sh 2017-07-04 19:40:23.248644401 +0200 @@ -362,7 +362,11 @@ # Determine if the set_memory_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_memory_uc(void) { set_memory_uc(); }" @@ -375,7 +379,11 @@ # Determine if the set_memory_array_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_memory_array_uc(void) { set_memory_array_uc(); }" @@ -388,7 +396,11 @@ # Determine if the set_pages_uc() function is present. # CODE=" - #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include + #else + #include + #endif void conftest_set_pages_uc(void) { set_pages_uc(); }" --- kernel/nv-vm.c.orig 2017-07-04 20:01:37.098802679 +0200 +++ kernel/nv-vm.c 2017-07-04 20:02:23.720384972 +0200 @@ -13,6 +13,10 @@ #include "nv.h" #include "nv-linux.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + #include +#endif + static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages) { if (nv_update_memory_types)