Skip to content

Commit

Permalink
nvidia_linux 340.96: Fix build error with Linux 4.6
Browse files Browse the repository at this point in the history
Fix the build errors below [1][2].

```
[…]
/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c: In function ‘os_lock_user_pages’:
/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:61:13: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
             page_cache_release(user_pages[i]);
             ^
cc1: some warnings being treated as errors
scripts/Makefile.build:291: recipe for target '/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o' failed
make[2]: *** [/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o] Error 1
Makefile:1429: recipe for target '_module_/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel' failed
make[1]: *** [_module_/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel] Error 2
make[1]: Leaving directory '/dev/shm/linux-4.6.3-91.x86_64/source'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
Makefile:184: recipe for target 'nvidia.ko' failed
make: *** [nvidia.ko] Error 1
```

[1] https://github.com/manjaro/packages-extra/blame/ddae91f20ddf82874fce8604f86c12711f718994/linux46-extramodules/nvidia-340xx/PKGBUILD
[2] https://github.com/manjaro/packages-extra/issues/68
  • Loading branch information
pmenzel committed Jul 5, 2016
1 parent ff9ea8d commit 8572e89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvidia_linux-4.6.3-91-340.96-0.bee
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ mee_extract() {
}

mee_patch() {
# page_cache_release() -> put_page(); 09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a
sed -i 's|page_cache_release|put_page|g' "${S}"/os-mlock.c

# get_user_pages() to not pass tsk/mm; d4edcf0d56958db0aca0196314ca38a5e730ea92
sed -i 's|get_user_pages(current, mm, |get_user_pages(|g' "${S}"/os-mlock.c
}
Expand Down

0 comments on commit 8572e89

Please sign in to comment.