error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
2014-12-28 15:50
555 查看
在编译Android 4.0驱动的时候,使用到了proc_dir_entry结构体中的owner成员,但是编译的时候,却出现了下面的错误:
[plain] view
plaincopy
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成员,
在该结构体中添加以下代码:
[cpp] view
plaincopy
struct module *owner;
保存后,重新编译,OK了。
proc_fs.h文件在kernel源码下的include/linux目录下面
[plain] view
plaincopy
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成员,
在该结构体中添加以下代码:
[cpp] view
plaincopy
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 的解决方法
- 移植2.6.31遇到的问题(1):'struct uart_info' has no member named 'tty'
- Linux-world-2012-January->13(error: 'S3C24X0_GPIO' has no member named 'GPACON')
- 【Python 脚本报错】AttributeError:'module' has no attribute 'xxx'的解决方法
- 移植2.6.31遇到的问题(2):'struct device' has no member named 'bus_id'
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- 'class QApplication' has no member named 'setMainWidget'
- scapy AttributeError: 'NoneType' object has no attribute 'route'解决办法
- No bean named 'springSecurityFilterChain' is defined 解决方法
- Error No. 1130 Host '*.*.*.*' is not allowed to connect to this MySQL server解决方法
- ubuntu-13.10安装vmware tools报struct dentry’ has no member named ‘d_count错,修正方法
- error: ‘struct device’ has no member named ‘bus_id’
- error: ‘struct dentry’ has no member named ‘d_count’
- The entry '**' has already been added错误的解决方法
- VMware 共享文件夹 error: ‘struct dentry’ has no member named ‘d_alias’
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- ERROR: Dll 'AppName[UID].APP' has initialised data 解决方法
- php5.4.26 安装出现 error: ‘struct gdIOCtx’ has no member named ‘data’