summaryrefslogtreecommitdiff
path: root/sql/signal_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/signal_handler.cc')
-rw-r--r--sql/signal_handler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index 2d3eaa609aa..6aac9ac5962 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -32,7 +32,7 @@
#endif
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/sysctl.h>
#endif
@@ -54,7 +54,7 @@ extern const char *optimizer_switch_names[];
static inline void output_core_info()
{
/* proc is optional on some BSDs so it can't hurt to look */
-#if defined(HAVE_READLINK) && !defined(__APPLE__)
+#if defined(HAVE_READLINK) && !defined(__APPLE__) && !defined(__FreeBSD__)
char buff[PATH_MAX];
ssize_t len;
int fd;
@@ -85,7 +85,7 @@ static inline void output_core_info()
my_close(fd, MYF(0));
}
#endif
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
char buff[PATH_MAX];
size_t len = sizeof(buff);
if (sysctlbyname("kern.corefile", buff, &len, NULL, 0) == 0)