From: Janis Ruksans Date: Thu, 28 Jun 2012 06:01:25 +0000 (+0200) Subject: If ast_channel struct is not declared before ast_register_application2, X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=ad9a780ce71095bd785eeea8cd6f58606c66ce79 If ast_channel struct is not declared before ast_register_application2, gcc thinks that the implicit declaration in module.h is different from the one in channel.h, and issues a warning about incompatible pointer types. A forward declaration before including module.h fixes this. Due to some brain-deadness in Ast, including channel.h before module.h causes the compilation fail altogether. Signed-off-by: Andreas Eversberg --- diff --git a/chan_lcr.c b/chan_lcr.c index 2903243..a81e48d 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -136,6 +136,13 @@ it is called from ast_channel process which has already locked ast_channel. #ifdef LCR_FOR_ASTERISK #include #endif + +/* + * Fwd declare struct ast_channel to get rid of gcc warning about + * incompatible pointer type passed to ast_register_application2. + */ +struct ast_channel; + #include #include #include