kernel 5.1 相比 5.0 又发生了新的变化,导致 virtualbox-5.2.24 的编译又失败了,是 2 个 commit 引起的变化:
- commit 746c9398f5ac2b3f5730da4ed09e99ef4bb50b4a
arch: move common mmap flags to linux/mman.h
...
- commit 736706bee3298208343a76096370e4f6a5c55915
get rid of legacy 'get_ds()' function
...
解决方法是修改 /usr/src/virtualbox-5.2.24/r0drv/linux/the-linux-kernel.h
#include <asm/mman.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/div64.h>
+ #include <linux/mman.h>
+ #define get_ds() (KERNEL_DS)