summaryrefslogtreecommitdiff
path: root/graphics/fotoxx/patches/patch-ab
blob: 8c1501889f927e0be88630acd37809eb3d778090 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-ab,v 1.9 2012/08/24 12:48:11 ryoon Exp $

--- zfuncs.cc.orig	2012-08-04 11:58:30.000000000 +0000
+++ zfuncs.cc
@@ -81,6 +81,7 @@ void zappcrash(cchar *pMess, ... )
 
    printf("*** zappcrash: \n %s \n",message);                              //  output message to stdout
 
+#if defined (HAVE_LINEXECINFO)
    nstack = backtrace(stacklist,nstack);                                   //  get traceback data
    stackents = backtrace_symbols(stacklist,nstack);
 
@@ -90,6 +91,7 @@ void zappcrash(cchar *pMess, ... )
    fid1 = fopen("zappcrash","w");                                          //  text file for backtrace
 
    fprintf(fid1,"zappcrash: \n %s \n",message);                            //  output message to text file
+#endif
    
    cc = readlink("/proc/self/exe",progexe,300);                            //  get own program path
    if (cc <= 0) {
@@ -98,6 +100,7 @@ void zappcrash(cchar *pMess, ... )
    }
    progexe[cc] = 0;
 
+#if defined (HAVE_LINEXECINFO)
    for (ii = 0; ii < nstack; ii++)                                         //  output backtrace to text file
    {
       pfunc = 0;
@@ -117,6 +120,7 @@ void zappcrash(cchar *pMess, ... )
 
       fprintf(fid1," %s %s \n",stackents[ii],pfunc);                       //  write to text file
    }
+#endif
 
    fclose(fid1);