From: Ian Campbell Subject: Re: [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation Date: Thu, 5 Jun 2014 16:39:55 +0100 Message-ID: <1401982795.15729.144.camel@hastur.hellion.org.uk> References: <1401721703-34974-1-git-send-email-roger.pau@citrix.com> <1401721703-34974-14-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WsZln-0004Rc-K3 for xen-devel@lists.xenproject.org; Thu, 05 Jun 2014 15:39:59 +0000 In-Reply-To: <1401721703-34974-14-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: xen-devel@lists.xenproject.org, Ian Jackson List-Id: xen-devel@lists.xenproject.org On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote: > Add the FreeBSD specific uuid implementation. Since uuid_t is not > defined as an array, but as a struct on FreeBSD, use a union with a > array in order to be able to return the uuid as a bytearray. > > Also, added a libxl internal compile time assert macro, that is used > to assert that the size of uuid_t is the same as the union used in > libxl. This is incredibly similar to the FreeBS version, could this not be done with a few choice || defined(__FreeBSD__) (adding the union you've got here or not as you choose)? Ian.