Ticket #2936 (closed defect: fixed)
Virtualbox-ose doesn't compile with kernel-headers-2.6.28 => Fixed in SVN
Reported by: | wuno | Owned by: | |
---|---|---|---|
Priority: | major | Component: | host support |
Version: | VirtualBox 2.1.0 | Keywords: | |
Cc: | Guest type: | other | |
Host type: | Linux |
Description
In file included from /usr/include/linux/byteorder/little_endian.h:14,
from /usr/include/asm/byteorder.h:80, from /usr/include/linux/cdrom.h:17, from /var/tmp/portage/app-emulation/virtualbox-ose-2.1.0/work/VirtualBox-2.1.0/src/VBox/Devices/Storage/DrvHostDVD.cpp:54:
/usr/include/linux/byteorder/swabb.h: In function '__u32 __fswahw32(__u32)':
/usr/include/linux/byteorder/swabb.h:94: error: ISO C++ forbids braced-groups within expressions
/usr/include/linux/byteorder/swabb.h: In function '__u32 __swahw32p(__u32*)':
/usr/include/linux/byteorder/swabb.h:99: error: ISO C++ forbids braced-groups within expressions
/usr/include/linux/byteorder/swabb.h: In function '__u32 __fswahb32(__u32)':
/usr/include/linux/byteorder/swabb.h:109: error: ISO C++ forbids braced-groups within expressions
/usr/include/linux/byteorder/swabb.h: In function '__u32 __swahb32p(__u32*)':
/usr/include/linux/byteorder/swabb.h:114: error: ISO C++ forbids braced-groups within expressions
CXX Drivers - {C}/src/VBox/Devices/Storage/DrvRawImage.cpp
kmk [2]: * [/var/tmp/portage/app-emulation/virtualbox-ose-2.1.0/work/VirtualBox-2.1.0/out/linux.amd64/release/obj/Drivers/Storage/DrvHostDVD.o] Error 1
New in kernel-headers-2.6.28 is that beside swab.h also <linux/byteorder/swabb.h> gets included by include/linux/byteorder/little_endian.h. This include makes the trouble with C++ as posted. Virtualbox comes with its own swab.h header and that gets included by src/VBox/Devices/Storage/DrvHostDVD after defining _LINUX_BYTEORDER_SWAB_H.
By defining also _LINUX_BYTEORDER_SWABB_H in src/VBox/Devices/Storage/DrvHostDVD, the inclusion of linux/byteorder/swabb.h is omitted and the build succeeds.