Commit 10467ec7 authored by Jan Lindström's avatar Jan Lindström

Fix compiler error introduced on revision 3937, make sure that stackdump is...

Fix compiler error introduced on revision 3937, make sure that stackdump is compiled only on __linux__.
parent 9c3a76c8
......@@ -19,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "os0thread.h"
#ifndef __WIN__
#ifdef __linux__
#include <execinfo.h>
#include <signal.h>
......@@ -34,6 +34,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
#ifndef __USE_GNU
#define __USE_GNU
#endif
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE
#endif
/* Since kernel version 2.2 the undocumented parameter to the signal handler has been declared
obsolete in adherence with POSIX.1b. A more correct way to retrieve additional information is
......@@ -122,4 +125,4 @@ os_stacktrace_print(
free(messages);
}
#endif /* ! __WIN__ */
#endif /* __linux__ */
......@@ -1261,7 +1261,7 @@ innobase_start_or_create_for_mysql(void)
stacktrace feature. */
if (srv_use_stacktrace) {
#ifndef __WIN__
#ifdef __linux__
struct sigaction sigact;
sigact.sa_sigaction = os_stacktrace_print;
......@@ -1274,7 +1274,7 @@ innobase_start_or_create_for_mysql(void)
srv_use_stacktrace = FALSE;
}
#endif /*! __WIN__ */
#endif /* __linux__ */
}
......
......@@ -487,7 +487,7 @@ sync_array_cell_print(
signal to thread waiting for the semaphore. Signal handler
will then dump the current stack to error log. */
if (srv_use_stacktrace) {
#ifndef __WIN__
#ifdef __linux__
pthread_kill(cell->thread, SIGUSR2);
#endif
}
......@@ -551,7 +551,7 @@ sync_array_cell_print(
signal to thread that has locked RW-latch with write mode.
Signal handler will then dump the current stack to error log. */
if (writer != RW_LOCK_NOT_LOCKED && srv_use_stacktrace) {
#ifndef __WIN__
#ifdef __linux__
pthread_kill(rwlock->writer_thread, SIGUSR2);
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment