dsc3507
Posts: 40
Joined: Sun Apr 28, 2013 5:08 am

dahdi compile problem

Wed Feb 26, 2014 3:36 pm

I posted this in Raspbien os but maybe someone here could help -

I am having trouble compiling dahdi-linux-complete-2.9.0+2.9.0.1 on a Raspbien 3.10.25+ kernel. I get the following error -

/usr/src/dahdi-linux-complete-2.9.0+2.9.0.1/linux/drivers/dahdi/dahdi-base.c:570:2: error: implicit declaration of function kzalloc [-Werror=implicit-function-declaration]

/usr/src/dahdi-linux-complete-2.9.0+2.9.0.1/linux/drivers/dahdi/dahdi-base.c:1391:2: error: implicit declaration of function kmalloc [-Werror=implicit-function-declaration]

as well as a lot of warnings like -

/usr/src/dahdi-linux-complete-2.9.0+2.9.0.1/linux/drivers/dahdi/dahdi-base.c:570:6: warning: assignment makes pointer from integer without a cast [enabled by default]

I am obviously missing something. Can anyone help? I have the kernel source and I have configured it and actually compiled it successfully. The /lib/modules/3.10.25+/build and source links are pointing to the kernel source.

dsc3507
Posts: 40
Joined: Sun Apr 28, 2013 5:08 am

Re: dahdi compile problem

Wed Feb 26, 2014 5:24 pm

Going to forward an answer I got from Asterisk list that works!

Odd...if it is only kzalloc, kmalloc, etc.. I wonder if it is
resolved if you include linux/slab.h in include/dahdi/kernel.h.
Something like:

diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index f2f9ec5..c19aec5 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -43,6 +43,7 @@
#include <linux/cdev.h>
#include <linux/module.h>
#include <linux/ioctl.h>
+#include <linux/slab.h>

#ifdef CONFIG_DAHDI_NET
#include <linux/hdlc.h>

danlewis
Posts: 2
Joined: Fri Apr 25, 2014 7:21 pm

Re: dahdi compile problem

Fri Apr 25, 2014 7:40 pm

Thanks very much for this...it solved my dahdi compilation problem after I switched to the Raspbian repo kernel.

adicusar
Posts: 8
Joined: Tue Jun 10, 2014 9:40 am

Re: dahdi compile problem

Tue Jun 10, 2014 9:42 am

could you give details...
I tried and it does not work :(

Return to “C/C++”