summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/init_signals.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sim/init_signals.cc b/src/sim/init_signals.cc
index 5acfe45fd..c7960c516 100644
--- a/src/sim/init_signals.cc
+++ b/src/sim/init_signals.cc
@@ -50,6 +50,11 @@
#include <iostream>
#include <string>
+#if defined(__FreeBSD__)
+#include <sys/param.h>
+
+#endif
+
#include "base/atomicio.hh"
#include "base/cprintf.hh"
#include "base/misc.hh"
@@ -67,7 +72,11 @@ static bool
setupAltStack()
{
stack_t stack;
+#if defined(__FreeBSD__) && (__FreeBSD_version < 1100097)
+ stack.ss_sp = (char *)fatalSigStack;
+#else
stack.ss_sp = fatalSigStack;
+#endif
stack.ss_size = sizeof(fatalSigStack);
stack.ss_flags = 0;