summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-06-24 20:43:09 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-06-24 20:43:09 +0200
commit131aab4658e3ea81416b476192c652657484002f (patch)
treeab2823964194d33140ac850aa1359e7197c1a2c5 /main.c
parent6946fe327145719cc59f026d151acf25c788297e (diff)
disable backtrace generation on non-linux OSes
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index 0cae38ba..b30c61b3 100644
--- a/main.c
+++ b/main.c
@@ -38,7 +38,9 @@
#include <sys/fcntl.h>
#include <sys/errno.h>
#include <signal.h>
+#ifdef __linux__
#include <execinfo.h>
+#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -429,6 +431,7 @@ sigterm_handler (int sig) {
exit (0);
}
+#ifdef __linux__
void
sigsegv_handler (int sig) {
fprintf (stderr, "Segmentation Fault\n");
@@ -458,10 +461,13 @@ sigsegv_handler (int sig) {
free(strings);
exit (0);
}
+#endif
int
main (int argc, char *argv[]) {
+#ifdef __linux__
signal (SIGSEGV, sigsegv_handler);
+#endif
setlocale (LC_ALL, "");
setlocale (LC_NUMERIC, "C");
#ifdef ENABLE_NLS