[Asterisk-bsd] cdr_mysql.c error on FreeBSD 5.2.1
Dr. Rich Murphey
asterisk-bsd@lists.digium.com
Mon, 19 Jul 2004 15:48:07 -0500
This appears to be a problem with asterisk/include/asterisk/lock.h.
Lock.h should #define the macro AST_MUTEX_DEFINE_STATIC(lock), but the
compiler seems to think that it is a function rather than a macro.
Email me the output of
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/local/include/mysql -C -E
-dD cdr_addon_mysql.c -o cdr_addon_mysql.txt
And perhaps I can help. It may not be much consolation, but I just 'cvs
update'ed and compiled without seeing those error messages. If you haven't
updated asterisk (server) as well, perhaps that would help ensure that
lock.h is in sync.
Cheers,
Rich
gmake
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/local/include/mysql `ls
*.c`
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/local/include/mysql -c -o
cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c: In function `mysql_log':
cdr_addon_mysql.c:111: warning: passing arg 1 of `localtime_r' from
incompatible pointer type
cc -shared -Xlinker -x -o cdr_addon_mysql.so cdr_addon_mysql.o -lmysqlclient
-lz -L/usr/local/lib/mysql
uname -a
FreeBSD xa.houston.rr.com 5.2.1-RC FreeBSD 5.2.1-RC #0: Mon Jun 14 18:18:35
CDT 2004
root@xa.houston.rr.com:/usr/a/altq-freebsd-5.2-release-beta2/sys/i386/compil
e/TEST i386
/usr/local/bin/mysql -V
/usr/local/bin/mysql Ver 11.18 Distrib 3.23.58, for portbld-freebsd5.2
(i386)
> -----Original Message-----
> From: asterisk-bsd-admin@lists.digium.com
> [mailto:asterisk-bsd-admin@lists.digium.com] On Behalf Of
> Vitaly Apolonsky
> Sent: Monday, July 19, 2004 2:56 PM
> To: asterisk-bsd@lists.digium.com
> Subject: [Asterisk-bsd] cdr_mysql.c error on FreeBSD 5.2.1
>
>
>
> asterisk# uname -a
> FreeBSD asterisk 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Sun
> Jun 6 22:09:46 GMT 2004
> root@:/usr/src/sys/i386/compile/asterisk i386
>
>
> cdr_addon_mysql.c 1.5 Fri Jul 9 16:24:28 2004
>
>
> asterisk# gmake
> ./mkdep -fPIC -I/usr/local/include -D_GNU_SOURCE
> -I/usr/local/include/mysql `ls *.c`
> cc -fPIC -I/usr/local/include -D_GNU_SOURCE
> -I/usr/local/include/mysql -c -o cdr_addon_mysql.o
> cdr_addon_mysql.c
> cdr_addon_mysql.c:50: warning: parameter names (without
> types) in function declaration
> cdr_addon_mysql.c:50: warning: data definition has no type or
> storage class
> cdr_addon_mysql.c: In function `mysql_log':
> cdr_addon_mysql.c:107: error: `mysql_lock' undeclared (first
> use in this function)
> cdr_addon_mysql.c:107: error: (Each undeclared identifier is
> reported only once
> cdr_addon_mysql.c:107: error: for each function it appears in.)
> cdr_addon_mysql.c:111: warning: passing arg 1 of
> `localtime_r' from incompatible pointer type
> cdr_addon_mysql.c: In function `usecount':
> cdr_addon_mysql.c:417: error: `mysql_lock' undeclared (first
> use in this function)
> gmake: *** [cdr_addon_mysql.o] Error 1
>
> asterisk#
>
> Can anyone help ?
>
> --
> Best regards,
> Vitaly Apolonsky mailto:apollo@nameserver.net.ua
>
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>