概述
when I compile ethercat, compile:错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)
摘自:http://blog.csdn.net/lkssbc/article/details/6905773
编译LDD3中的scull出现错误,错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)
处理办法:
再次编译通过。
原因:
(擦,我用的是3.0.0的内核,已经被删除了)
备忘,仅供参考。
error: ‘SPIN_LOCK_UNLOCKED’undeclared here (not in a function) 错误的解析
摘自:http://hi.baidu.com/lrbpp/blog/item/0f02781a01bc75c636d122a7
Full error:
/tmp/.MP2CHYBH8/parallels-kernel-modules/src/hypervisor-api/Linux/hyp_api.c:75:38:error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in afunction) /tmp/.MP2CHYBH8/parallels-kernel-modules/src/hypervisor-api/Linux/hyp_api.c:112:2:error: implicit declaration of function ‘kmalloc’ |
Apparently SPIN_LOCK_UNLOCKED has been deprecated(弃用) since 2007and completely removed since version 2.6.39.
I was able to patch that by adding the removed line back into tospinlock_types.h but I'm not sure about the kmalloc.
So @Parallels team; please update I wanna try/buy this software.<3
And @Everyone else; know of a temporary patch to fix the kmallocissue? :(
If I could patch the sourcedirectly it'd be ok but I'm sort of scared to since I can'tcontinue the installation from the same tmp folder and if I justran the make from there I might miss some finalizing routine Idon't know about. x.x
现在使用voidspin_lock_init(spinlock_t *lock);
函数代替初始化 自旋锁spin;
最后
以上就是悦耳玫瑰为你收集整理的compile:错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)的全部内容,希望文章能够帮你解决compile:错误: ‘SPIN_LOCK_UNLOCKED’未声明(不在函数内)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复