Re: [Yaffs] fix for mkyaffsimage compile error

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Tony Ibbs
Date:  
To: Frank Rowand
CC: yaffs
Subject: Re: [Yaffs] fix for mkyaffsimage compile error
Frank Rowand wrote:
> When I compile mkyaffsimage on RedHat 9.0, I get errors that look
> like the errors reported in the email thread "Compile error when using
> yaffs/direct" started by Daniel Gustafsson, Fri, 8 Oct 2004 15:28:35.
>
> The problem is caused by some #define statements in
> /usr/include/bits/stat.h:
>
>    # define st_atime st_atim.tv_sec        /* Backward compatibility.  */
>    # define st_mtime st_mtim.tv_sec
>    # define st_ctime st_ctim.tv_sec

>
> The attached patch is one way to fix the problem for mkyaffsimage.


An alternative is to specify -D_POSIX_SOURCE to gcc, as suggested by the
FreeBSD "man 2 stat" (so I assume this problem would show up on BSD as
well). Not sure if that's a better or worse solution.

Tibs