!virtualbox-ose (virtualbox-ose-4.2.14) (bad C++ code)

Niclas Zeising zeising at daemonic.se
Wed Jul 3 23:54:01 UTC 2013


On 07/04/13 01:46, Jung-uk Kim wrote:
> On 2013-07-03 19:37:45 -0400, Niclas Zeising wrote:
>> On 07/03/13 19:58, Jung-uk Kim wrote:
>>> On 2013-07-03 13:38:46 -0400, AN wrote:
>>>> FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #73 r252430:
>>>> Sun Jun 30 17:30:59 CDT 2013 
>>>> root at FBSD10:/usr/obj/usr/src/sys/MYKERNEL  amd64
>>>
>>>> VBox upgrade fails.
>>>
>>>
>>>
>>>> In file included from 
>>>> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.14/src/VBox/Devices/Storage/DrvHostBase.cpp:105:
>>>
>>>>
>>>>
> /usr/include/cam/cam_ccb.h: In function 'cam_status
>>>> cam_ccb_status(ccb*)': /usr/include/cam/cam_ccb.h:1309: error: 
>>>> invalid conversion from 'unsigned int' to 'cam_status'
>>> ...
>>>
>>> This problem was introduced with r252382.  Basically, C
>>> compilers don't complain about this implicit casting but C++
>>> compilers do not like it at all.  Luckily, it is easy to fix.
>>> Please see the attached patch.
> 
>> Hi! I'm getting a similar error when compiling
>> sysutils/smartmontools, however your proposed patch does not work,
>> at least not when compiling with clang.
> 
> It works for me, for both clang++ and g++ on head.  I tried
> sysutils/smartmontools, too.  Are you sure you have the new header
> file in /usr/include/cam? ;-)

At this hour I'm not sure of anything ;)
If I put the correct parenthesis everywhere, it certainly works better.
 Sorry for the noise.
-- 
Niclas Zeising


More information about the freebsd-ports mailing list