[chan-capi-users] Compiling chan_capi 1.1.1 on Slackware 12.1
Hector Ortiz
imp at harddriving.net
Tue Oct 21 22:21:56 CEST 2008
On Tuesday 21 October 2008, Armin Schindler wrote:
> On Mon, 20 Oct 2008, Hector Ortiz wrote:
> > Hello,
> >
> > I am having trouble compiling chan_capi on a Slackware 12.1 system. When
> > I run make I get the following error:
> >
> > ./create_config.sh "/usr/include"
> > Checking Asterisk version... 1.4.22
> > * found Asterisk version 1.4
> > Using Asterisk 1.4 API
> > * found stringfield in ast_channel
> > * found 'indicate' with data
> > * found extended ast_channel_alloc
> > * found second extended ast_channel_alloc
> > * found send_digit_end with duration
> > config.h complete.
> >
> > gcc -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -g
> > -I./libcapi20 -I/usr/include -D_REENTRANT -D_GNU_SOURCE
> > -O6 -march=i686 -Wno-missing-prototypes -Wno-missing-declarations
> > -DCRYPTO -c chan_capi.c -o chan_capi.o
> > gcc -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -g
> > -I./libcapi20 -I/usr/include -D_REENTRANT -D_GNU_SOURCE
> > -O6 -march=i686 -Wno-missing-prototypes -Wno-missing-declarations
> > -DCRYPTO -c chan_capi_utils.c -o chan_capi_utils.o
> > In file included from chan_capi20.h:28,
> > from chan_capi_utils.c:21:
> > /usr/include/linux/capi.h:80: error: expected ':', ',', ';', '}'
> > or '__attribute__' before '*' token
> > make: *** [chan_capi_utils.o] Error 1
> >
> > Compiling chan_capi 1.1.1 on Slackware 11 worked flawlessly. I compared
> > the /usr/include/linux/capi.h files from both slack 11 and 12.1 and they
> > looked identical. I have no idea what the problem could be. Any help
> > would be appreciated.
>
> I don't know anything about Slackware, but if capi.h is really identical,
> maybe one of the other capi header files isn't:
> /usr/include/capi20.h
> /usr/include/capicmd.h
> /usr/include/capiutils.h
>
> What kernelversion is used?
>
> Armin
Hi Armin,
Thank you for your reply. I compared the /usr/include/linux/capi.h with diff
and they are different after all. The kernel includes in Slackware 12.1 are
from Linux 2.6.24.5. The kernel version I am using is also 2.6.24.5.
I did get chan_capi 1.1.1 to compile cleanly by making a small change
to /usr/include/linux/capi.h. See patch below. I do not know if this a
proper fix, but I will test it out to see if chan_capi works with Asterisk
and my Diva server BRI card.
Hector
--- capi.h 2008-10-21 12:07:09.922078590 -0400
+++ capi.h-new 2008-10-21 12:06:33.186240048 -0400
@@ -77,7 +77,7 @@
typedef struct capi_manufacturer_cmd {
unsigned long cmd;
- void __user *data;
+ void *data;
} capi_manufacturer_cmd;
/*
More information about the Chan-capi-users
mailing list