aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fotoxx/no-execinfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/fotoxx/no-execinfo.patch')
-rw-r--r--testing/fotoxx/no-execinfo.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/fotoxx/no-execinfo.patch b/testing/fotoxx/no-execinfo.patch
new file mode 100644
index 0000000000..2c8195c9e9
--- /dev/null
+++ b/testing/fotoxx/no-execinfo.patch
@@ -0,0 +1,65 @@
+diff --git a/zfuncs.cc b/zfuncs.cc
+index 0427f99..686b75a 100644
+--- a/zfuncs.cc
++++ b/zfuncs.cc
+@@ -45,12 +45,14 @@ void appcrash(cchar *pMess, ... )
+ va_end(arglist);
+
+ printf("appcrash: \n %s \n",message);
+-
++#ifndef __UCLIBC__
+ nstack = backtrace(stacklist,nstack); // good for g++ -rdynamic
+ stackents = backtrace_symbols(stacklist,nstack);
+ for (ii = 0; ii < nstack; ii++)
+ printf(" %s \n",stackents[ii]);
+-
++#else
++ printf("backtrace not available\n");
++#endif
+ abort(); // good for gdb backtrace
+ }
+
+@@ -105,11 +107,13 @@ void zappcrash(cchar *pMess, ... ) // v
+
+ printf("zappcrash: \n %s \n",message); // stdout message v.3.7
+
++#ifndef __UCLIBC__
+ nstack = backtrace(stacklist,nstack); // get traceback data
+ stackents = backtrace_symbols(stacklist,nstack);
+
+ for (ii = 0; ii < nstack; ii++) // stdout backtrace
+ printf(" %s \n",stackents[ii]);
++#endif
+
+ fid1 = fopen("zappcrash","w"); // text file for backtrace
+
+@@ -118,6 +122,7 @@ void zappcrash(cchar *pMess, ... ) // v
+ cc = readlink("/proc/self/exe",progexe,300); // get own program path
+ progexe[cc] = 0;
+
++#ifndef __UCLIBC__
+ for (ii = 0; ii < nstack; ii++) // output backtrace
+ {
+ pfunc = 0;
+@@ -137,6 +142,7 @@ void zappcrash(cchar *pMess, ... ) // v
+
+ fprintf(fid1," %s %s \n",stackents[ii],pfunc); // write to text file
+ }
++#endif
+
+ fclose(fid1);
+
+diff --git a/zfuncs.h b/zfuncs.h
+index 9ec9a6b..76b7b44 100644
+--- a/zfuncs.h
++++ b/zfuncs.h
+@@ -34,7 +34,9 @@
+ #include <pthread.h>
+ #include <errno.h>
+ #include <signal.h>
++#ifndef __UCLIBC__
+ #include <execinfo.h>
++#endif
+ #include <locale.h>
+ #include <sys/inotify.h>
+