ITeye博客

linux编译内核关于semaphore.h头文件的问题

koliy · 2013-05-24 14:50 · android驱动学习 · 编程语言 · Markdown

编译wifi的驱动,有时候会提示以下错误信息: error: field 'sem_req' has incomplete type error: field 'sem_async' has incomplete type error: implicit declaration of function 'up' error: implicit declaration of function 'down_interruptible' 。。。。

原因是linux内核升级之后,关于semaphore的头文件变了。修正这个错误很简单,只要在报错的文件中加入正确的头文件 #include <linux/semaphore.h> 不是 <asm/semaphore.h>了。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。