dahdi 在 内核 kernel-2.6.29 or 2.6.33 编译错误
hello, all of users:
there are header files missed when you compile dahdi with kernel-2.6.29 or 2.6.33. i believe
that few files are affected: wctdm.c dahdi-base.c wcb4xxp/base.c, opvxa1200.c...
the errors look like these:
================================================
from /usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:61:
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/include/dahdi/dahdi_config.h:27:28: error: linux/autoconf.h: No such file or directory
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function '__qevent':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:839: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:839: error: (Each undeclared identifier is reported only once
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:839: error: for each function it appears in.)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function 'schluffen':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:867: error: dereferencing pointer to incomplete type
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:867: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:869: error: implicit declaration of function 'signal_pending'
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:870: error: implicit declaration of function 'schedule'
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:872: error: dereferencing pointer to incomplete type
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:872: error: 'TASK_RUNNING' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function 'dahdi_timer_ioctl':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:3418: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function 'dahdi_chanandpseudo_ioctl':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:4419: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function '__dahdi_getbuf_chunk':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:6075: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function '__rbs_otimer_expire':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:6263: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function '__putbuf_chunk':
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c:7203: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/usr/src/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/dahdi-base.c: In function 'dahdi_hdlc_finish':
==================================
after digging the code, i changed the files and add some linux headers.
#include <linux/kernel.h>
#include <linux/errno.h>
+#include <linux/sched.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
=================
and add this:
#ifdef __KERNEL__
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,1
#include <linux/config.h>
#else
+#include <generated/autoconf.h>
-#include <linux/autoconf.h>
#endif
#endif
=========================
Regards!
james.zhu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论