29 lines
894 B
Diff
29 lines
894 B
Diff
--- src/main.c.orig 2015-06-18 08:13:27.185634622 +0000
|
|
+++ src/main.c 2015-06-18 08:14:36.524223552 +0000
|
|
@@ -47,7 +47,7 @@
|
|
#include <openssl/crypto.h>
|
|
#include <openssl/err.h>
|
|
#include <openssl/ssl.h>
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
#include <execinfo.h>
|
|
#endif
|
|
#include "cloexec.h"
|
|
@@ -1065,7 +1065,7 @@
|
|
notify_all_threads();
|
|
}
|
|
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
static int popen_annotate_backtrace_symbols(void)
|
|
{
|
|
char *cmd_fullpath = h2o_configurator_get_cmd_path("share/h2o/annotate-backtrace-symbols"), *argv[] = {cmd_fullpath, NULL};
|
|
@@ -1118,7 +1118,7 @@
|
|
{
|
|
h2o_set_signal_handler(SIGTERM, on_sigterm);
|
|
h2o_set_signal_handler(SIGPIPE, SIG_IGN);
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
if ((backtrace_symbols_to_fd = popen_annotate_backtrace_symbols()) == -1)
|
|
backtrace_symbols_to_fd = 2;
|
|
h2o_set_signal_handler(SIGABRT, on_sigfatal);
|