about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index bc404ba9f1e..647927d5c4b 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -34,7 +34,8 @@
 // the rust stack and happen frequently enough to catch most stack changes,
 // including at the beginning of all landing pads.
 // FIXME: Enable this for windows
-#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__
+#if (defined __linux__ || defined __APPLE__ || defined __FreeBSD__) \
+    && (defined(GCC_VERSION) && GCC_VERSION > 40300)
 extern "C" void
 check_stack_alignment() __attribute__ ((aligned (16)));
 #else