The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / wvstreams / 0002-fix-uClibc-compile-execinfo-backtrace.patch
1 Fix wvstreams so that it builds with uClibc: we don't have execinfo.h,
2 so we can't do backtrace() stuff.
3
4 Signed-off-by: Simon Dawson <spdawson@gmail.com>
5
6 diff -Nurp a/utils/wvcrash.cc b/utils/wvcrash.cc
7 --- a/utils/wvcrash.cc  2008-12-17 12:24:20.000000000 +0000
8 +++ b/utils/wvcrash.cc  2012-07-27 22:00:15.456502262 +0100
9 @@ -28,7 +28,9 @@
10  // FIXME: this file mostly only works in Linux
11  #ifdef __linux
12  
13 -# include <execinfo.h>
14 +#ifdef HAVE_EXECINFO_H
15 +#include <execinfo.h>
16 +#endif
17  #include <unistd.h>
18  
19  #ifdef __USE_GNU
20 @@ -267,9 +269,11 @@ static void wvcrash_real(int sig, int fd
21         }
22      }
23  
24 +#ifdef HAVE_EXECINFO_H
25      wr(fd, "\nBacktrace:\n");
26      backtrace_symbols_fd(trace,
27                  backtrace(trace, sizeof(trace)/sizeof(trace[0])), fd);
28 +#endif
29      
30      if (pid > 0)
31      {