From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ROHmm-0008TL-Uw for mharc-grub-devel@gnu.org; Wed, 09 Nov 2011 18:42:28 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROHmk-0008Sr-Ks for grub-devel@gnu.org; Wed, 09 Nov 2011 18:42:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROHmi-0000Id-Rj for grub-devel@gnu.org; Wed, 09 Nov 2011 18:42:26 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:38434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROHmi-0000IT-MP for grub-devel@gnu.org; Wed, 09 Nov 2011 18:42:24 -0500 Received: by wwe3 with SMTP id 3so2607323wwe.30 for ; Wed, 09 Nov 2011 15:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=v/Wr08xNwqUhmiO7SCIYskJeCAvGA7IJ52X9+tvbS+Y=; b=A0H7LPAarN+lCP1a6UUiZmQG0rZnXkXn5k085W/W6H3CLeHBcn9hSeW2ifpan9nnCc xR2bQi5gyk0eOJQmRMByfCJePJ1qrJcjFIUNnr3u7Q93x/Sb5Jt3hBPKuQV88cA4GtSr 0HWwOzYkQKdsB1TEsCPJKrCHVaDtfN4ErjHFg= Received: by 10.180.19.9 with SMTP id a9mr5446325wie.32.1320882143185; Wed, 09 Nov 2011 15:42:23 -0800 (PST) Received: from [192.168.1.114] (c2433-1-88-160-112-182.fbx.proxad.net. [88.160.112.182]) by mx.google.com with ESMTPS id en13sm7416058wbb.22.2011.11.09.15.42.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 15:42:22 -0800 (PST) Message-ID: <4EBB0FDD.5020606@gmail.com> Date: Thu, 10 Nov 2011 00:42:21 +0100 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Iceowl/1.0b2 Icedove/3.1.15 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Issue in netbsd_bootinfo.h References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 23:42:27 -0000 On 11/09/2011 01:14 AM, Seth Goldberg wrote: > Hi, > > The following structure definition is causing linker failures (not with GNU > ld) when building GRUB2: > > struct grub_netbsd_btinfo_bootwedge { > grub_uint32_t biosdev; > grub_disk_addr_t startblk; > grub_uint64_t nblks; > grub_disk_addr_t matchblk; > grub_uint64_t matchnblks; > grub_uint8_t matchhash[16]; /* MD5 hash */ > } __packed; > > > The question is: Is this a valid way to declare a structure with a packed > data structure on NetBSD? Yes. IIRC, this struct declaration was inspired from: http://nxr.netbsd.org/xref/src/sys/arch/x86/include/bootinfo.h#70 > Or did you mean to add "__attribute__((packed))" > there? Indeed, you're right. NetBSD defines __packed depending on the compiler: http://nxr.netbsd.org/source/xref/src/sys/sys/cdefs.h#314 For GCC, it's "__attribute__((__packed__))" as you said. Sorry about that. I wonder why it didn't cause problems until now, though. Grégoire