Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > 编译linux内核时i2c.h错误以及解决方法
【标  题】:编译linux内核时i2c.h错误以及解决方法
【关键字】:linux,i2c.h
【来  源】:http://blog.chinaunix.net/article.php?articleId=48737&blogId=9445

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

Your Ad Here


在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内核没学到位...哪位高人指点下原因?

Proc文件详解:【上一篇】
乱七嗽?Apache+php+gb+phpMyAdmin):【下一篇】
【相关文章】
  • Linux系统各文件、目录介绍(转)
  • LINUX下更改JAVA环境变量
  • LINUX小命令
  • 系统学习Linux11点建议(转)
  • Websites for Linux Games
  • linux-2.6内核升级文档
  • Linux启动性能分析工具
  • 我与Linux
  • Redhat LinuxFedora Core4发布了
  • Linux网络编程
  • 【随机文章】
  • Linux RPM包使用指南
  • 常用的SQL语句
  • cron守护进程管理
  • 预言中国(四)文凭二十年内成废纸!
  • 可编辑的表格控件
  • 一个用组件动态创建Excel文件的实例
  • 决策树教程(一)
  • .NET之ASP WebApplication快速入门(2)
  • Why not C?
  • 简单图形模拟吃豆游戏
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.