Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jul 2013 13:58:06 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        AN <andy@neu.net>
Cc:        "scottl@FreeBSD.org" <scottl@freebsd.org>, vbox@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: !virtualbox-ose (virtualbox-ose-4.2.14) (bad C++ code)
Message-ID:  <51D4662E.9050503@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.1307031334450.82358@mail.neu.net>
References:  <alpine.BSF.2.00.1307031334450.82358@mail.neu.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030001080801020309060407
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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@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.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQEcBAEBAgAGBQJR1GYuAAoJECXpabHZMqHOOZMH/35zhOVHd+SL5h8b7B2t01sD
+KVY/aggL4GewjhBtzqZd+RZtopBK8RS3vrT8ZykTpy5ftRP14evJipBq1BtooV5
jLYl07DM1+BrUJlB+xCAGPCo9PSOD/VWiGVlj/gb+ix1AihXnkf0dNw0RQ0V5ul9
wLYvju1wrw8gr4ZjeASsX3I4lcARjn6nMzWGXDNjsnftRYDg/LSDbUft9KkcCE7A
TSAHlsA+8iTFh4vk1NTxPBVypoFW6ZAlivd3oihhd/5vgjuAkloh5pjNj04sJUsC
7G07XFTA9rruc11+qwQL1uJH7UgpzdcHXtuvnzQIozFD22+FA1k+Z1qHFct0KWw=
=0boR
-----END PGP SIGNATURE-----

--------------030001080801020309060407
Content-Type: text/x-patch;
 name="cam_ccb.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="cam_ccb.diff"

Index: sys/cam/cam_ccb.h
===================================================================
--- sys/cam/cam_ccb.h	(revision 252574)
+++ sys/cam/cam_ccb.h	(working copy)
@@ -1306,7 +1306,7 @@ cam_set_ccbstatus(union ccb *ccb, cam_status statu
 static __inline cam_status
 cam_ccb_status(union ccb *ccb)
 {
-	return (ccb->ccb_h.status & CAM_STATUS_MASK);
+	return ((cam_status)(ccb->ccb_h.status & CAM_STATUS_MASK));
 }
 
 void cam_calc_geometry(struct ccb_calc_geometry *ccg, int extended);

--------------030001080801020309060407--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51D4662E.9050503>