[vbox-dev] VirtualBox Fix for kernel 2.6.33

Larry Finger Larry.Finger at lwfinger.net
Tue Jan 5 08:32:00 PST 2010


On 01/05/2010 02:47 AM, Frank Mehnert wrote:
> On Monday 28 December 2009, Frank Mehnert wrote:
>> Larry,
>>
>> On Monday 28 December 2009, Larry Finger wrote:
>>> In kernel 2.6.33, the file include/linux/autoconf.h is no longer
>>> created. The following patch skips including this file for kernels
>>> 2.6.33 or later.
>>
>> the fix is wrong as linux/version.h does not contain the information
>> of linux/autoconf.h. We will commit a proper fix within the next days.
> 
> See
> 
>   http://www.virtualbox.org/changeset/25591
> 
> for a better fix.

Thanks Frank.

For those people not using the OSE, and would prefer not to use the SVN
changeset web listing, here is that info converted into a patch.

Index: src/vboxdrv/SUPDrvInternal.h

===================================================================

--- src.orig/vboxdrv/SUPDrvInternal.h

+++ src/vboxdrv/SUPDrvInternal.h

@@ -80,7 +80,9 @@

     RT_C_DECLS_END



 #elif defined(RT_OS_LINUX)

-#   include <linux/autoconf.h>

+#   ifndef AUTOCONF_INCLUDED

+#    include <linux/autoconf.h>

+#   endif

 #   include <linux/version.h>

 #   if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)

 #       define MODVERSIONS

Index: src/vboxdrv/include/internal/iprt.h

===================================================================

--- src.orig/vboxdrv/include/internal/iprt.h

+++ src/vboxdrv/include/internal/iprt.h

@@ -43,7 +43,9 @@

  && defined(MODULE) \

  && !defined(RT_NO_EXPORT_SYMBOL)

 # define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */

-# include <linux/autoconf.h>

+# ifndef AUTOCONF_INCLUDED

+#  include <linux/autoconf.h>

+# endif

 # if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)

 #  include <linux/version.h>

 #  define MODVERSIONS

Index: src/vboxdrv/include/iprt/types.h

===================================================================

--- src.orig/vboxdrv/include/iprt/types.h

+++ src/vboxdrv/include/iprt/types.h

@@ -97,7 +97,9 @@

 #  define true linux_true

 #  define false linux_false

 #  define uintptr_t linux_uintptr_t

-#  include <linux/autoconf.h>

+#  ifndef AUTOCONF_INCLUDED

+#   include <linux/autoconf.h>

+#  endif

 #  include <linux/types.h>

 #  include <linux/stddef.h>

 #  undef uintptr_t

Index: src/vboxdrv/r0drv/linux/the-linux-kernel.h

===================================================================

--- src.orig/vboxdrv/r0drv/linux/the-linux-kernel.h

+++ src/vboxdrv/r0drv/linux/the-linux-kernel.h

@@ -38,7 +38,9 @@

 #include <iprt/types.h>

 #define bool linux_bool



-#include <linux/autoconf.h>

+#ifndef AUTOCONF_INCLUDED

+# include <linux/autoconf.h>

+#endif

 #include <linux/version.h>



 /* We only support 2.4 and 2.6 series kernels */

Index: src/vboxnetadp/include/internal/iprt.h

===================================================================

--- src.orig/vboxnetadp/include/internal/iprt.h

+++ src/vboxnetadp/include/internal/iprt.h

@@ -43,7 +43,9 @@

  && defined(MODULE) \

  && !defined(RT_NO_EXPORT_SYMBOL)

 # define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */

-# include <linux/autoconf.h>

+# ifndef AUTOCONF_INCLUDED

+#  include <linux/autoconf.h>

+# endif

 # if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)

 #  include <linux/version.h>

 #  define MODVERSIONS

Index: src/vboxnetadp/include/iprt/types.h

===================================================================

--- src.orig/vboxnetadp/include/iprt/types.h

+++ src/vboxnetadp/include/iprt/types.h

@@ -97,7 +97,9 @@

 #  define true linux_true

 #  define false linux_false

 #  define uintptr_t linux_uintptr_t

-#  include <linux/autoconf.h>

+#  ifndef AUTOCONF_INCLUDED

+#   include <linux/autoconf.h>

+#  endif

 #  include <linux/types.h>

 #  include <linux/stddef.h>

 #  undef uintptr_t

Index: src/vboxnetadp/r0drv/linux/the-linux-kernel.h

===================================================================

--- src.orig/vboxnetadp/r0drv/linux/the-linux-kernel.h

+++ src/vboxnetadp/r0drv/linux/the-linux-kernel.h

@@ -38,7 +38,9 @@

 #include <iprt/types.h>

 #define bool linux_bool



-#include <linux/autoconf.h>

+#ifndef AUTOCONF_INCLUDED

+# include <linux/autoconf.h>

+#endif

 #include <linux/version.h>



 /* We only support 2.4 and 2.6 series kernels */

Index: src/vboxnetflt/include/internal/iprt.h

===================================================================

--- src.orig/vboxnetflt/include/internal/iprt.h

+++ src/vboxnetflt/include/internal/iprt.h

@@ -43,7 +43,9 @@

  && defined(MODULE) \
  && !defined(RT_NO_EXPORT_SYMBOL)
 # define bool linux_bool /* see r0drv/linux/the-linux-kernel.h */
-# include <linux/autoconf.h>
+# ifndef AUTOCONF_INCLUDED
+#  include <linux/autoconf.h>
+# endif
 # if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
 #  include <linux/version.h>
 #  define MODVERSIONS
Index: src/vboxnetflt/include/iprt/types.h
===================================================================
--- src.orig/vboxnetflt/include/iprt/types.h
+++ src/vboxnetflt/include/iprt/types.h
@@ -97,7 +97,9 @@
 #  define true linux_true
 #  define false linux_false
 #  define uintptr_t linux_uintptr_t
-#  include <linux/autoconf.h>
+#  ifndef AUTOCONF_INCLUDED
+#   include <linux/autoconf.h>
+#  endif
 #  include <linux/types.h>
 #  include <linux/stddef.h>
 #  undef uintptr_t
Index: src/vboxnetflt/r0drv/linux/the-linux-kernel.h
===================================================================
--- src.orig/vboxnetflt/r0drv/linux/the-linux-kernel.h
+++ src/vboxnetflt/r0drv/linux/the-linux-kernel.h
@@ -38,7 +38,9 @@
 #include <iprt/types.h>
 #define bool linux_bool

-#include <linux/autoconf.h>
+#ifndef AUTOCONF_INCLUDED
+# include <linux/autoconf.h>
+#endif
 #include <linux/version.h>

 /* We only support 2.4 and 2.6 series kernels */

Larry





More information about the vbox-dev mailing list