summaryrefslogtreecommitdiff
blob: e790842faed83c9bbd78a0986f9d718075f59606 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff -Naur icewm-1.3.7.orig/configure.in icewm-1.3.7/configure.in
--- icewm-1.3.7.orig/configure.in	2010-10-31 10:09:37.000000000 -0400
+++ icewm-1.3.7/configure.in	2013-10-19 06:20:22.947520430 -0400
@@ -113,6 +113,7 @@
 AC_CHECK_HEADERS(libgen.h)	dnl --  basename() for FreeBSD
 AC_CHECK_HEADERS(machine/apmvar.h)
 AC_CHECK_HEADERS(machine/apm_bios.h)
+AC_CHECK_HEADERS(execinfo.h)
 
 AC_CHECK_HEADERS(kstat.h,
   [ CORE_LIBS="${CORE_LIBS} -lkstat"
diff -Naur icewm-1.3.7.orig/src/acpustatus.cc icewm-1.3.7/src/acpustatus.cc
--- icewm-1.3.7.orig/src/acpustatus.cc	2010-10-31 10:09:36.000000000 -0400
+++ icewm-1.3.7/src/acpustatus.cc	2013-10-19 06:20:18.355519888 -0400
@@ -25,17 +25,12 @@
 #include "sysdep.h"
 #include "default.h"
 
-#if defined(linux)
-//#include <linux/kernel.h>
-#include <sys/sysinfo.h>
-#endif
 #if defined(sun) && defined(SVR4)
 #include <sys/loadavg.h>
 #endif
 #ifdef HAVE_KSTAT_H
 #include <sys/resource.h>
 #include <kstat.h>
-#include <sys/sysinfo.h>
 #endif
 
 #ifdef HAVE_SYS_PARAM_H
@@ -56,6 +51,10 @@
 #include <dirent.h>
 #include "intl.h"
 
+#if defined(linux) || defined(HAVE_KSTAT_H)
+#include <sys/sysinfo.h>
+#endif
+
 #if (defined(linux) || defined(HAVE_KSTAT_H)) || defined(HAVE_SYSCTL_CP_TIME)
 
 extern ref<YPixmap> taskbackPixmap;
diff -Naur icewm-1.3.7.orig/src/misc.cc icewm-1.3.7/src/misc.cc
--- icewm-1.3.7.orig/src/misc.cc	2010-10-31 10:09:36.000000000 -0400
+++ icewm-1.3.7/src/misc.cc	2013-10-19 06:20:22.947520430 -0400
@@ -15,7 +15,7 @@
 #include <libgen.h>
 #endif
 
-#ifdef linux
+#if defined(linux) && defined(HAVE_EXECINFO_H)
 #include <execinfo.h>
 #endif
 
@@ -503,7 +503,7 @@
 }
 
 void show_backtrace() {
-#ifdef linux
+#if defined(linux) && defined(HAVE_EXECINFO_H)
     const char head[] = "\nbacktrace:\n";
     const char tail[] = "end\n";
     void *array[20];