3.9.0-rcX kernel: MAX_PRIO/MAX_RT_PRIO moved in sched/rt.h

Discussions related to using the OSE version of VirtualBox.
Post Reply
incident41
Posts: 58
Joined: 14. May 2012, 18:50
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Windows 10 64-bit
Location: Italy

3.9.0-rcX kernel: MAX_PRIO/MAX_RT_PRIO moved in sched/rt.h

Post by incident41 »

Which implies that VirtualBox 4.2.8 build fails like this:

Code: Select all

kBuild: Compiling RuntimeR0Drv - /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/timer-r0drv-linux.c
kBuild: Compiling RuntimeR0Drv - /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
/share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c: In function 'rtThreadNativeSetPriority':
/share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c:58:59: error: 'MAX_PRIO' undeclared (first use in this function)
/share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c:58:59: note: each undeclared identifier is reported only once for each function it appears in
/share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c:62:36: error: 'MAX_RT_PRIO' undeclared (first use in this function)
kmk: *** [/share/vbox/VirtualBox-4.2.8/out/linux.amd64/release/obj/RuntimeR0Drv/r0drv/linux/thread2-r0drv-linux.o] Error 1
Reason is that the two macros have been moved into the new linux/sched/rt.h include file.

My band-aid for this has been simply to add the new include in the above VirtualBox source file:

Code: Select all

diff -urN /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c-428 /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
--- /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c-428	2013-02-27 21:47:33.000000000 +0100
+++ /share/vbox/VirtualBox-4.2.8/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c	2013-03-11 21:47:59.620920400 +0100
@@ -35,6 +35,7 @@
 #include <iprt/thread.h>
 #include <iprt/err.h>
 #include "internal/thread.h"
+#include <linux/sched/rt.h>

 
 RTDECL(RTTHREAD) RTThreadSelf(void)
Don't know whether this is the optimal approach - this is just a heads-up that with the simple band-aid Works For Me (TM).
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: 3.9.0-rcX kernel: MAX_PRIO/MAX_RT_PRIO moved in sched/rt

Post by Perryg »

Yes this has been addressed in SVN and looks similar to what you have done.
Post Reply