error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
2013-03-08 16:20
621 查看
在编译Android 4.0驱动的时候,使用到了proc_dir_entry结构体中的owner成员,但是编译的时候,却出现了下面的错误:
由错误信息可以看出struct proc_dir_entry结构体中没有找到owner的成员。
看到引用的proc_fs.h头文件,发现里面的struct proc_dir_entry结构体中,的确没有owner成员,
在该结构体中添加以下代码:
保存后,重新编译,OK了。
proc_fs.h文件在kernel源码下的include/linux目录下面
drivers/hello/hello.c:217: error: 'struct proc_dir_entry' has no member named 'owner' make[2]: *** [drivers/hello/hello.o] 错误 1 make[1]: *** [drivers/hello] 错误 2 make: *** [drivers] 错误 2
由错误信息可以看出struct proc_dir_entry结构体中没有找到owner的成员。
看到引用的proc_fs.h头文件,发现里面的struct proc_dir_entry结构体中,的确没有owner成员,
在该结构体中添加以下代码:
struct module *owner;
保存后,重新编译,OK了。
proc_fs.h文件在kernel源码下的include/linux目录下面
相关文章推荐
- error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- 移植2.6.31遇到的问题(2):'struct device' has no member named 'bus_id'
- 【Python 脚本报错】AttributeError:'module' has no attribute 'xxx'的解决方法
- Linux-world-2012-January->13(error: 'S3C24X0_GPIO' has no member named 'GPACON')
- 移植2.6.31遇到的问题(1):'struct uart_info' has no member named 'tty'
- No bean named 'springSecurityFilterChain' is defined 解决方法
- 出现module 'xgboost' has no attribute 'DMatrix'的临时解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- yum错误'module' object has no attribute 'iterparse'解决方法
- 继承QGraphicsItem 编译错误:error: no member named 'staticMetaObject' in 'QGraphicsItem'; did you mean sim
- AttributeError: 'module' object has no attribute 的解决方法
- 'class QApplication' has no member named 'setMainWidget'
- 虚拟机安装vmtools 共享文件夹失败 错误:error: ‘struct dentry’ has no member named ‘d_alias’
- Android之error: 'const struct JNINativeInterface' has no member named 'callVoidMethod'
- 错误:'class QApplication' has no member named 'setMainwidget'
- error: ‘struct dentry’ has no member named ‘d_count’
- 编译驱动时error: ‘struct file’ has no member named ‘f_dentry’
- error: 'struct passwd' has no member named 'pw_comment'