`
tairgee
  • 浏览: 3683 次
文章分类
社区版块
存档分类
最新评论

mkyaffs2image mac osx 编译错误的解决

阅读更多
1、下载代码:

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

下载 yaffs2-source.tar

2、解压缩后,编译:

tar xvf yaffs2-source.tar
cd yaffs2/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 -Winline yaffs_ecc.c -o yaffs_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 -Winline mkyaffsimage.c -o mkyaffsimage.o
In file included from mkyaffsimage.c:31:
../yaffs_guts.h:831: warning: ‘struct iattr’ declared inside parameter list
../yaffs_guts.h:831: warning: its scope is only this definition or declaration, which is probably not what you want
../yaffs_guts.h:832: warning: ‘struct iattr’ declared inside parameter list
../yaffs_guts.h:835: error: expected declaration specifiers or ‘…’ before ‘loff_t’
../yaffs_guts.h:837: error: expected declaration specifiers or ‘…’ before ‘loff_t’
../yaffs_guts.h:839: error: expected declaration specifiers or ‘…’ before ‘loff_t’

修改错误:

vi devextras.h

添加如下代码:

#if defined(__APPLE__) || defined (__FreeBSD__)
typedef long long loff_t;
#endif
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics