dahdi 在 内核 kernel-2.6.29 or 2.6.33 编译错误

发布于 2022-08-29 04:27:20 字数 4411 浏览 11 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文