I am having problems with adding the ODBC applications to asterisk. The “wiki-Asterisk+app_dbodbc” page at the voip-info.org provides a file named app_dbodbc.c for this purpose but does not compile on my system. Errors are:
/usr/include/asterisk/file.h:27:2: error: #error You must include stdio.h before file.h!
In file included from /usr/include/asterisk/linkedlists.h:23,
/usr/include/asterisk/lock.h: In function ‘ast_mutex_init’:
/usr/include/asterisk/lock.h:517: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function)
/usr/include/asterisk/lock.h:517: error: (Each undeclared identifier is reported only once
/usr/include/asterisk/lock.h:517: error: for each function it appears in.)
In file included from app_dbodbc.c:34:
/usr/include/asterisk/file.h: At top level:
/usr/include/asterisk/file.h:56: error: syntax error before ‘’ token
/usr/include/asterisk/file.h:57: error: syntax error before ‘’ token
If its a version problem, then is there an “app_dbodbc.c” for 1.2.4??
I’ll appreciate any help.