[vbox-dev] Patch to build VBox kernel module under kernel 3.9
Larry Finger
Larry.Finger at lwfinger.net
Mon Mar 4 16:46:28 PST 2013
On 03/04/2013 10:48 AM, Larry Finger wrote:
> One of the headers needed to compile VBox must be explicitly added for kernel
> 3.9. The patch is
>
> Index: vboxhost/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
> ===================================================================
> --- vboxhost.orig/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
> +++ vboxhost/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
> @@ -34,6 +34,7 @@
> #include <iprt/assert.h>
> #include <iprt/thread.h>
> #include <iprt/err.h>
> +#include <linux/sched/rt.h>
> #include "internal/thread.h"
>
>
>
> The patch is under the MIT license.
That patch only works with 3.9. The correct version is
Index: vboxhost/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
===================================================================
--- vboxhost.orig/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
+++ vboxhost/vboxdrv/r0drv/linux/thread2-r0drv-linux.c
@@ -34,6 +34,9 @@
#include <iprt/assert.h>
#include <iprt/thread.h>
#include <iprt/err.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#include <linux/sched/rt.h>
+#endif
#include "internal/thread.h"
More information about the vbox-dev
mailing list