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

dahdi compile problem with raspbien

Wed Feb 26, 2014 8:44 am

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 with raspbien

Wed Feb 26, 2014 5:23 pm

Going to repeat 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>

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5880
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: dahdi compile problem with raspbien

Thu Feb 27, 2014 1:56 am


Return to “Raspbian”