[Home]

Summary:ASTERISK-10905: [patch] Add missing includes in SVN Trunk
Reporter:James Golovich (jamesgolovich)Labels:
Date Opened:2007-11-27 19:55:05.000-0600Date Closed:2007-12-04 16:58:58.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-include.diff.txt
Description:Due to the recent changes abstract_jb.h and lock.h are missing the declaration of ast_channel

This simple patch fixes this
Comments:By: Russell Bryant (russell) 2007-11-27 22:58:30.000-0600

Hmm ... I am thinking that it's acceptable to require than any file using any of the asterisk headers should also be including asterisk.h.  Where did this problem get you?

By: James Golovich (jamesgolovich) 2007-11-27 23:36:22.000-0600

I noticed it today after you updated the siptls branch, I had the same issue so I decided to update trunk and see if it was there as well and it was.  Maybe it only shows up if --enable-dev-mode is on

By: Russell Bryant (russell) 2007-11-29 07:41:33.000-0600

Which file failed to compile for you before this change?

By: James Golovich (jamesgolovich) 2007-11-29 12:54:45.000-0600

Looks like anything with lock.h included.

  [CC] astman.c -> astman.o
In file included from /home/james/src/svnrepo/asterisk-trunk/include/asterisk/linkedlists.h:23,
                from astman.c:40:
/home/james/src/svnrepo/asterisk-trunk/include/asterisk/lock.h:1191: warning: `struct ast_channel' declared inside parameter list
/home/james/src/svnrepo/asterisk-trunk/include/asterisk/lock.h:1191: warning: its scope is only this definition or declaration, which is probably not what you want
/home/james/src/svnrepo/asterisk-trunk/include/asterisk/lock.h:1196: warning: `struct ast_channel' declared inside parameter list
/home/james/src/svnrepo/asterisk-trunk/include/asterisk/lock.h:1200: warning: `struct ast_channel' declared inside parameter list
make[1]: *** [astman.o] Error 1
make: *** [utils] Error 2

For the life of me I can't get the abstract_jb.h one to show up again, so I'm not sure exactly what file had a problem with that one.  I just recompiled completely with the lock.h fix in but no abstract_jb.h fix and everything compiled fine.

By: Digium Subversion (svnbot) 2007-12-04 16:58:57.000-0600

Repository: asterisk
Revision: 91029

U   trunk/utils/astman.c

------------------------------------------------------------------------
r91029 | russell | 2007-12-04 16:58:56 -0600 (Tue, 04 Dec 2007) | 4 lines

Fix the build of astman.  Any file that includes any asterisk sub-headers
needs to first include asterisk.h.
(closes issue ASTERISK-10905)

------------------------------------------------------------------------