add workaround for NULL __dso_handle

This commit is contained in:
Cody P Schafer
2014-12-03 19:17:44 -05:00
parent e07cb2e6f2
commit f77f5b3c65
2 changed files with 26 additions and 0 deletions
@@ -0,0 +1,25 @@
From 4003a6e93e558fb327879b1d500bdbaa85ae06ae Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Wed, 3 Dec 2014 19:15:19 -0500
Subject: [PATCH] std/thread_local: workaround for NULL __dso_handle
---
src/libstd/thread_local/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
index e2e8461..2bf891e 100644
--- a/src/libstd/thread_local/mod.rs
+++ b/src/libstd/thread_local/mod.rs
@@ -308,7 +308,7 @@ mod imp {
#[linkage = "extern_weak"]
static __cxa_thread_atexit_impl: *const ();
}
- if !__cxa_thread_atexit_impl.is_null() {
+ if !__cxa_thread_atexit_impl.is_null() && !__dso_handle.is_null() {
type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8),
arg: *mut u8,
dso_handle: *mut u8) -> libc::c_int;
--
2.1.3
+1
View File
@@ -13,4 +13,5 @@ SRC_URI_append = "\
file://0009-XXX-remove-conflicting-realpath-hack.patch \
file://0010-XXX-configure-unneeded-windows-check.patch \
file://0011-Parallelize-submake-invocations.patch \
file://0020-std-thread_local-workaround-for-NULL-__dso_handle.patch \
"