--- libsanitizer/tsan/tsan_rtl_amd64.S.orig	2014-11-13 20:41:38 UTC
+++ libsanitizer/tsan/tsan_rtl_amd64.S
@@ -170,7 +170,7 @@ setjmp:
   CFI_ADJUST_CFA_OFFSET(8)
   CFI_REL_OFFSET(%rdi, 0)
   // obtain %rsp
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__BSDSUniX__)
   lea 8(%rsp), %rdi
   mov %rdi, %rsi
 #else
@@ -202,7 +202,7 @@ _setjmp:
   CFI_ADJUST_CFA_OFFSET(8)
   CFI_REL_OFFSET(%rdi, 0)
   // obtain %rsp
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__BSDSUniX__)
   lea 8(%rsp), %rdi
   mov %rdi, %rsi
 #else
@@ -241,7 +241,7 @@ sigsetjmp:
   sub $8, %rsp
   CFI_ADJUST_CFA_OFFSET(8)
   // obtain %rsp
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__BSDSUniX__)
   lea 24(%rsp), %rdi
   mov %rdi, %rsi
 #else
@@ -287,7 +287,7 @@ __sigsetjmp:
   sub $8, %rsp
   CFI_ADJUST_CFA_OFFSET(8)
   // obtain %rsp
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__BSDSUniX__)
   lea 24(%rsp), %rdi
   mov %rdi, %rsi
 #else
@@ -316,7 +316,7 @@ __sigsetjmp:
   CFI_ENDPROC
 .size __sigsetjmp, .-__sigsetjmp
 
-#if defined(__FreeBSD__) || defined(__linux__)
+#if defined(__FreeBSD__) || defined(__linux__) || defined(__BSDSUniX__)
 /* We do not need executable stack.  */
 .section        .note.GNU-stack,"",@progbits
 #endif
