From owner-freebsd-ports@FreeBSD.ORG Wed Jul 3 17:58:55 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id B89E7B3A; Wed, 3 Jul 2013 17:58:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <51D4662E.9050503@FreeBSD.org> Date: Wed, 03 Jul 2013 13:58:06 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130626 Thunderbird/17.0.7 MIME-Version: 1.0 To: AN Subject: Re: !virtualbox-ose (virtualbox-ose-4.2.14) (bad C++ code) References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------030001080801020309060407" Cc: "scottl@FreeBSD.org" , vbox@freebsd.org, freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 17:58:55 -0000 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--