On 14.08.2013 15:49, Grégoire Sutre wrote:
On 08/14/2013 03:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
On 14.08.2013 15:09, Ilya Bakulin wrote:
./lib/posix_wrap/sys/types.h:25: error: conflicting types for 'size_t'
/usr/include/stddef.h:48: error: previous declaration of 'size_t' was
here
gmake[3]: *** [fs/squash4_module-squash4.o] Error 1
You need to modify following:
#ifndef __APPLE__
typedef grub_size_t size_t;
#else
#include <stddef.h>
#endif
to
#if !defined (__APPLE__) && !defined (__OPENBSD__)
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
This is not right fix. Many systems incorrectly define wchar_t as 16-bit
type whil GRUB needs at least 21 as we handle all unicode characters.
Please try:
=== modified file 'grub-core/lib/posix_wrap/wchar.h'
--- grub-core/lib/posix_wrap/wchar.h 2012-02-09 13:24:55 +0000
+++ grub-core/lib/posix_wrap/wchar.h 2013-08-15 14:55:59 +0000
@@ -21,6 +21,11 @@
#include <grub/charset.h>
+#if defined(__NetBSD__) || defined(__OPENBSD__)
+#define wchar_t grub_posix_wchar_t
+#define mbstate_t grub_posix_mbstate_t
+#endif
+
/* UCS-4. */
typedef grub_int32_t wint_t;
enum
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel