mkyaffs2image mac osx 编译错误的解决

1、下载代码:

http://code.google.com/p/fatplus/downloads/list

下载yaffs2-source.tar

2、解压缩后,编译:

tarxvfyaffs2-source.tar

cdyaffs2/utils

make

出现错误提示:

gcc-c-I/usr/include-I..-O2-Wall-DCONFIG_YAFFS_UTIL-Wshadow-Wpointer-arith-Wwrite-strings-Wstrict-prototypes-Wmissing-declarations-Wmissing-prototypes-Wredundant-decls-Wnested-externs-Winlineyaffs_ecc.c-oyaffs_ecc.o

gcc-c-I/usr/include-I..-O2-Wall-DCONFIG_YAFFS_UTIL-Wshadow-Wpointer-arith-Wwrite-strings-Wstrict-prototypes-Wmissing-declarations-Wmissing-prototypes-Wredundant-decls-Wnested-externs-Winlinemkyaffsimage.c-omkyaffsimage.o

Infileincludedfrommkyaffsimage.c:31:

../yaffs_guts.h:831:warning:‘structiattr’declaredinsideparameterlist

../yaffs_guts.h:831:warning:itsscopeisonlythisdefinitionordeclaration,whichisprobablynotwhatyouwant

../yaffs_guts.h:832:warning:‘structiattr’declaredinsideparameterlist

../yaffs_guts.h:835:error:expecteddeclarationspecifiersor‘…’before‘loff_t’

../yaffs_guts.h:837:error:expecteddeclarationspecifiersor‘…’before‘loff_t’

../yaffs_guts.h:839:error:expecteddeclarationspecifiersor‘…’before‘loff_t’

修改错误:

videvextras.h

添加如下代码:

#ifdefined(__APPLE__)||defined(__FreeBSD__)

typedeflonglongloff_t;

#endif

相关推荐