文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>编译linux内核时i2c.h错误以及解决方法

编译linux内核时i2c.h错误以及解决方法

时间:2005-09-21  来源:yalolo


在fedora4上重新编译内核,用自带的/usr/src/kernel/2.6xxxxxx/下死活提示main.o出错,于是重新下载了一个2.6.11.1的内核

编译至此出错

CC drivers/i2c/i2c-core.o
In file included from drivers/i2c/i2c-core.c:29:
include/linux/i2c.h:58: error: array type has incomplete element type
include/linux/i2c.h:197: error: array type has incomplete element type
drivers/i2c/i2c-core.c: In function ‘i2c_transfer’:
drivers/i2c/i2c-core.c:594: error: type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c: In function ‘i2c_master_send’:
drivers/i2c/i2c-core.c:620: error: type of formal parameter 2 is incomplete
drivers/i2c/i2c-core.c: In function ‘i2c_master_recv’:
drivers/i2c/i2c-core.c:649: error: type of formal parameter 2 is incomplete
make[2]: *** [drivers/i2c/i2c-core.o] 错误 1
make[1]: *** [drivers/i2c] 错误 2
make: *** [drivers] 错误 2

解决方法:

将include/linux/i2c.h中第58,197行内struct i2c_msg msg[]改为struct i2c_msg *msg

linux内核没学到位...哪位高人指点下原因?

相关阅读 更多 +
排行榜 更多 +
零界之痕手游安卓下载

零界之痕手游安卓下载

角色扮演 下载
漫游都市手机版下载

漫游都市手机版下载

赛车竞速 下载
涡轮螺旋桨飞行模拟器无限金币版下载

涡轮螺旋桨飞行模拟器无限金币版下载

模拟经营 下载