linux编译内核关于semaphore.h头文件的问题
编译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>了。