Received: from list by lists.gnu.org with archive (Exim 4.71) id 1V9cp5-00043R-KH for mharc-grub-devel@gnu.org; Wed, 14 Aug 2013 11:17:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9cov-00041k-HY for grub-devel@gnu.org; Wed, 14 Aug 2013 11:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9coo-00022K-70 for grub-devel@gnu.org; Wed, 14 Aug 2013 11:17:09 -0400 Received: from gg6.genua.de ([2001:a60:f08e:c000::1]:18122 helo=gg.genua.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9con-00021g-QP for grub-devel@gnu.org; Wed, 14 Aug 2013 11:17:02 -0400 Received: from gg.genua.de (localhost.genua.de [127.0.0.1]) by gg.genua.de (8.14.5/8.14.5) with ESMTP id r7EFGwff022467 for ; Wed, 14 Aug 2013 17:16:58 +0200 (CEST) Received: (from localhost) by gg.genua.de (MSCAN) id 3/gg.genua.de/smtp-gw/mscan; Wed Aug 14 17:16:58 2013 From: Ilya Bakulin To: grub-devel@gnu.org Subject: Re: GRUB2 on OpenBSD 5.3-amd64: linking problem Date: Wed, 14 Aug 2013 17:16:44 +0200 User-Agent: KMail/1.9.10 (enterprise35 20120322.0d8ab49a133482885a7a6ae00ec4472b1859206f) References: <201308091537.37473.Ilya_Bakulin@genua.de> <520B86BB.20208@gmail.com> <520B8ACF.4010309@gmail.com> In-Reply-To: <520B8ACF.4010309@gmail.com> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <201308141716.45205.Ilya_Bakulin@genua.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:a60:f08e:c000::1 Cc: =?utf-8?q?Gr=C3=A9goire_Sutre?= 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, 14 Aug 2013 15:17:18 -0000 Hi, On Wednesday 14 August 2013 15:49:03 Gr=C3=A9goire Sutre wrote: > On 08/14/2013 03:31 PM, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > > You need to modify following: > > #ifndef __APPLE__ > > typedef grub_size_t size_t; > > #else > > #include > > #endif > > to > > #if !defined (__APPLE__) && !defined (__OPENBSD__) Yes, this works! > > For the record, this is also needed for NetBSD (when building > within the pkgsrc framework -- see pkgsrc's sysutils/grub2 package). > > A similar patch (for NetBSD, but maybe also for OpenBSD?) is: > > --- grub-core/lib/posix_wrap/wchar.h.orig 2012-02-08 20:34:24.000000000 > +0000 > +++ grub-core/lib/posix_wrap/wchar.h > @@ -29,7 +29,11 @@ enum > }; > > /* UCS-4. */ > +#if !defined(__NetBSD__) > typedef grub_int32_t wchar_t; > +#else > +#include > +#endif > > typedef struct mbstate { > grub_uint32_t code; Unfortunately, this doesn't seem to be enough, because stddef.h on OpenBSD= =20 already has the definition for mbstate_t. So if I let wchar.h define its ow= n=20 version, there is a definition conflict. And omitting stddef.h inclusion al= so=20 doesn't work, because stddef.h seems to be already included from elsewhere. If I move the "typedef mbstate .. mbstate_t" into '#if !defined(__OpenBSD__= )', then the code uses the version from stddef.h, which lacks "code" and "count= "=20 fields. It is defined as follows: /* * mbstate_t is an opaque object to keep conversion state, during multibyte * stream conversions. The content must not be referenced by user programs. */ typedef union { char __mbstate8[128]; __int64_t __mbstateL; /* for alignment */ } __mbstate_t; Anyway, I'm going to try the version from Bazaar. Will report the results=20 tomorrow. Thank you all for your help! =2D- Ilya