From: Ian Jackson Subject: Re: [PATCH RFC 09/23] lz4: add support for OSes that don't have asm/unaligned.h Date: Thu, 17 Apr 2014 18:00:20 +0100 Message-ID: <21328.2212.347963.413355@mariner.uk.xensource.com> References: <1397657612-57277-1-git-send-email-roger.pau@citrix.com> <1397657612-57277-10-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wapfo-00041X-6z for xen-devel@lists.xenproject.org; Thu, 17 Apr 2014 17:00:28 +0000 In-Reply-To: <1397657612-57277-10-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 Campbell List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("[PATCH RFC 09/23] lz4: add support for OSes that don't have asm/unaligned.h"): > Add a configure check for asm/unaligned.h presence, and if it's not > available open-code the necessary functions for lz4. Where did this code come from ? Is there nothing in the FreeBSD environment that we could reuse ? > +struct __una_u32 { uint32_t x __attribute__((packed)); }; > +struct __una_u16 { uint16_t x __attribute__((packed)); }; Are you sure this actually works ? I can't see anything in the GCC 4.4 docs which requires the compiler to generate special code to access such a variable. Ian.