[asterisk-dev] [asterisk-commits] tilghman: trunk r90157 -?/trunk/include/asterisk/lock.h
Luigi Rizzo
rizzo at icir.org
Thu Nov 29 14:01:02 CST 2007
On Thu, Nov 29, 2007 at 01:24:34PM -0600, Tilghman Lesher wrote:
> On Thursday 29 November 2007 11:46:07 Kevin P. Fleming wrote:
...
> > > +++ trunk/include/asterisk/lock.h Thu Nov 29 11:42:21 2007
> > > @@ -113,6 +113,8 @@
> > > { PTHREAD_MUTEX_INIT_VALUE, 0, { NULL }, {
> > > 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
> > >
> > > #define AST_MAX_REENTRANCY 10
> > > +
> > > +struct ast_channel;
> > >
> > > struct ast_mutex_info {
> > > pthread_mutex_t mutex;
> >
> > This should not be necessary, as this forward declaration already
> > appears in asterisk.h. Is there a module that includes lock.h but not
> > asterisk.h?
>
> utils/astman.c was the culprit. The real issue is that the include file was
> declaring some prototypes with the 'struct ast_channel *' parameter, but the
> struct itself was not declared. Rather than including a file that astman.c
> does not need, I figured that giving it a declaration to make the warning go
> away was the better thing to do.
Unfortunately this way you pollute lock.h .
Don't trust the stuff in utils/ - it is causing a lot of trouble because
it does not use the asterisk coding convetions and uses (used, i have seen
keving trying to fix that) non-standard build options.
cheers
luigi
More information about the asterisk-dev
mailing list