当前位置: 技术问答>linux和unix
模块编译出错,求帮助!!!谢谢!!!
来源: 互联网 发布时间:2016-12-27
本文导语: 出错信息如下: In file included from /forlinx/uClinux-2.4.27/include/linux/sched.h:18, from /forlinx/uClinux-2.4.27/include/linux/blkdev.h:5, from sata_sil.c:33: /forlinx/uClinux-2.4.27/include/asm/semaph...
出错信息如下:
In file included from /forlinx/uClinux-2.4.27/include/linux/sched.h:18,
from /forlinx/uClinux-2.4.27/include/linux/blkdev.h:5,
from sata_sil.c:33:
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:18: parse error before `wait_queue_head_t'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:18: warning: no semicolon at end of struct or union
/forlinx/uClinux-2.4.27/include/asm/semaphore.h: In function `sema_init':
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:47: warning: implicit declaration of function `atomic_set'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:47: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:48: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:49: warning: implicit declaration of function `init_waitqueue_head'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:49: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h: In function `sem_getcount':
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:130: warning: implicit declaration of function `atomic_read'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:130: dereferencing pointer to incomplete type
在网上查的信息是头文件包含冲突,之前查过在交叉编译工具安装路径下也有semaphore.h文件,这个地方是应该引用内核的头文件吧?怎么修改呢?
In file included from /forlinx/uClinux-2.4.27/include/linux/sched.h:18,
from /forlinx/uClinux-2.4.27/include/linux/blkdev.h:5,
from sata_sil.c:33:
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:18: parse error before `wait_queue_head_t'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:18: warning: no semicolon at end of struct or union
/forlinx/uClinux-2.4.27/include/asm/semaphore.h: In function `sema_init':
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:47: warning: implicit declaration of function `atomic_set'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:47: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:48: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:49: warning: implicit declaration of function `init_waitqueue_head'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:49: dereferencing pointer to incomplete type
/forlinx/uClinux-2.4.27/include/asm/semaphore.h: In function `sem_getcount':
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:130: warning: implicit declaration of function `atomic_read'
/forlinx/uClinux-2.4.27/include/asm/semaphore.h:130: dereferencing pointer to incomplete type
在网上查的信息是头文件包含冲突,之前查过在交叉编译工具安装路径下也有semaphore.h文件,这个地方是应该引用内核的头文件吧?怎么修改呢?
|
implicit declaration of function :atomic_set,init_waitqueue_head,atomic_read
这三个函数没有缺少对应的头文件;
一般atomic_xxx的在。
其他的楼主用命令找一下。
这三个函数没有缺少对应的头文件;
一般atomic_xxx的在。
其他的楼主用命令找一下。
|
内核的atomic.h 应该是#include吧