summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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