Hi, On Wednesday 14 August 2013 15:49:03 Grégoire Sutre wrote: > On 08/14/2013 03:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > You need to modify following: > > #ifndef __APPLE__ > > typedef grub_size_t size_t; > > #else > > #include <stddef.h> > > #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 <stddef.h> > +#endif > > typedef struct mbstate { > grub_uint32_t code; Unfortunately, this doesn't seem to be enough, because stddef.h on OpenBSD already has the definition for mbstate_t. So if I let wchar.h define its own version, there is a definition conflict. And omitting stddef.h inclusion also 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" 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 tomorrow. Thank you all for your help! -- Ilya _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel