I faced same problem before, and I solved it by modify the CYGPKG_FS_JFFS2_CFLAGS_ADD option like below.

-       default_value { "-D__ECOS -nostdinc -iwithprefix include" }
+ default_value { (CYGPKG_POSIX ? "-D_POSIX_SOURCE " : "") . "-D__ECOS -nostdinc -iwithprefix include" }

I have committed a patch servals days ago:
http://sourceware.org/ml/ecos-patches/2007-01/msg00070.html
That patch also fixed other spelling mistake and compiling warnings in JFFS2 package.

From: Andrew Lunn <[EMAIL PROTECTED]>
To: David Luca <[EMAIL PROTECTED]>
CC: Andrew Lunn <[EMAIL PROTECTED]>, ecos-discuss
<[EMAIL PROTECTED]>
Subject: Re: [ECOS] Building JFFS2 on net template fails
Date: Tue, 30 Jan 2007 20:13:30 +0100

On Tue, Jan 30, 2007 at 09:45:30AM -0800, David Luca wrote:
> No time machine, I just put in ecos-3.0 folder anything new from the
cvs for testing purposes only
> :)
> Thank you for your hack, it works. But I don't understand why these
types are redefined. Where
> should I include <stdint.h> since I don't want to change the package
files (like BSD), only
> platform files?
> David.

The problem is in

packages/compact/linux/current/include/linux/types.h

It has

#define uint8_t cyg_uint8
#define uint16_t cyg_uint16
#define uint32_t cyg_uint32

#define int8_t cyg_int8
#define int16_t cyg_int16
#define int32_t cyg_int32

So when bsdtypes.h is included afterward, which has....

typedef __signed char              int8_t;
typedef short                     int16_t;

etc, the int8_t gets replaced with cyg_int8 and you end up with
redefining the type.

The #defines need replacing with something better.

    Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to