usually va_list is expressed externally as void *<br><br><div>Is this the only place with an error?</div><div>try altering the code so the if and else is replaced by just the contents of the if. ie the switch va_sprintf line</div>
<div><br></div><div><br></div><div><br><div class="gmail_quote">On Sat, Jul 3, 2010 at 7:43 PM, mazilo <span dir="ltr">&lt;<a href="mailto:Nabble@slickdeals.endjunk.com">Nabble@slickdeals.endjunk.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I tried to compile freeswitch-1.0.6 on OpenWRT for a Marvell Kirkwood (ARM)<br>
platform to no avail. The same source codes compiled just fine for a<br>
Broadcomm (MIPS/MIPS32) platform. What fails to compile is the source code<br>
of sofia.c at line 1574 with the following error messages:<br>
<br>
++++++++++++++++++++++++++<br>
make[8]: Entering directory<br>
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia&#39;<br>
Creating mod_sofia_la-mod_sofia.lo<br>
mkdir .libs<br>
Compiling mod_sofia.c ...<br>
Creating mod_sofia_la-sofia.lo<br>
Compiling sofia.c ...<br>
sofia.c: In function &#39;logger&#39;:<br>
sofia.c:1574: error: used struct type value where scalar is required<br>
make[8]: *** [mod_sofia_la-sofia.lo] Error 1<br>
make[8]: Leaving directory<br>
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia&#39;<br>
make[7]: *** [all] Error 2<br>
make[7]: Leaving directory<br>
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia&#39;<br>
make[6]: *** [mod_sofia-all] Error 1<br>
make[6]: Leaving directory<br>
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod&#39;<br>
make[5]: *** [all-recursive] Error 1<br>
make[5]: Leaving directory<br>
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src&#39;<br>
++++++++++++++++++++++++++<br>
<br>
The pertaining sofia.c source code at line 1574 is shown below:<br>
<br>
++++++++++++++++++++++++++<br>
1569 static void logger(void *logarg, char const *fmt, va_list ap)<br>
1570 {<br>
1571         if (!fmt)<br>
1572                 return;<br>
1573<br>
1574         if (ap) {<br>
1575                 switch_log_vprintf(SWITCH_CHANNEL_LOG_CLEAN,<br>
mod_sofia_glob     als.tracelevel, fmt, ap);<br>
1576         } else {<br>
1577                 switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN,<br>
mod_sofia_globa     ls.tracelevel, &quot;%s&quot;, fmt);<br>
1578         }<br>
1579 }<br>
++++++++++++++++++++++++++<br>
<br>
I am no programmer; however, isn&#39;t va_list ap indicates ap is a struct type<br>
value while the if(ap) expects ap to be a scalar value? If so, why sofia.c<br>
doesn&#39;t fail to compile for a MIPS/MIPS32 platform but fails to compile for<br>
an ARM platform? That said, how does one go about to fix this so that<br>
sofia.c source will compile cleanly on both platforms?<br>
<br>
Thanks.<br>
--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/Failed-to-compile-sofia-c-for-ARM-tp5252219p5252219.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/Failed-to-compile-sofia-c-for-ARM-tp5252219p5252219.html</a><br>

Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>