[Freeswitch-dev] Fix for compile error on arm cross compile

Simon Capper scapper at ooma.com
Thu Jul 3 12:00:19 EDT 2008


Yes that worked.


Simon



Index: configure.in
===================================================================
--- configure.in    (revision 8884)
+++ configure.in    (working copy)
@@ -190,7 +190,7 @@
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS([sys/types.h sys/resource.h sched.h wchar.h sys/filio.h
sys/ioctl.h])
+AC_CHECK_HEADERS([sys/types.h sys/resource.h sched.h wchar.h sys/filio.h
sys/ioctl.h execinfo.h])
 
 # for xmlrpc-c config.h
 if test x"$ac_cv_header_wchar_h" = xyes; then
Index: src/switch_core_state_machine.c
===================================================================
--- src/switch_core_state_machine.c    (revision 8884)
+++ src/switch_core_state_machine.c    (working copy)
@@ -198,7 +198,7 @@
 //static switch_hash_t *stack_table = NULL;
 static Hash stack_table;
 
-#if defined (__GNUC__) && defined (LINUX)
+#if defined (__GNUC__) && defined (LINUX) && defined (HAVE_EXECINFO_H)
 #include <execinfo.h>
 #include <stdio.h>
 #include <stdlib.h>



On 7/3/08 8:20 AM, "Michael Jerris" <mike at jerris.com> wrote:

> 
>> +# some architectures don't have execinfo.h
>> +if test x"$ac_cv_header_execinfo_h" = xyes; then
>> +  APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_EXECINFO_H)
>> +fi
> 
> This part should not be required.  it will put that define into our
> generated header file.  Can you test and make sure it works without
> that part?
> 
> Mike
> 
> 
> On Jul 3, 2008, at 2:49 AM, Simon Capper wrote:
> 
>> I don't have execinfo.h so switch_core_stat_machine.c does not
>> compile.
>> 
>> This patch fixes the issue, can it be added to svn?
>> 
>> Thanks,
>> 
>> Simon
>> 
>> Index: configure.in
>> ===================================================================
>> --- configure.in    (revision 8884)
>> +++ configure.in    (working copy)
>> @@ -179,6 +179,13 @@
>>     ;;
>> esac
>> 
>> +AC_CHECK_HEADERS([execinfo.h])
>> +
>> +# some architectures don't have execinfo.h
>> +if test x"$ac_cv_header_execinfo_h" = xyes; then
>> +  APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_EXECINFO_H)
>> +fi
>> +
>> APR_REMOVEFROM(SWITCH_AM_CXXFLAGS, -std=c99)
>> 
>> AC_SUBST(SWITCH_AM_CFLAGS)
>> Index: src/switch_core_state_machine.c
>> ===================================================================
>> --- src/switch_core_state_machine.c    (revision 8884)
>> +++ src/switch_core_state_machine.c    (working copy)
>> @@ -198,7 +198,7 @@
>> //static switch_hash_t *stack_table = NULL;
>> static Hash stack_table;
>> 
>> -#if defined (__GNUC__) && defined (LINUX)
>> +#if defined (__GNUC__) && defined (LINUX) && defined
>> (HAVE_EXECINFO_H)
>> #include <execinfo.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>> 
>> 
>> 
>> _______________________________________________
>> Freeswitch-dev mailing list
>> Freeswitch-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
> 
> 
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org





More information about the Freeswitch-dev mailing list