about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/thread_local_storage.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs
index a9cd29c18c9..b2c2c670b55 100644
--- a/src/libstd/rt/thread_local_storage.rs
+++ b/src/libstd/rt/thread_local_storage.rs
@@ -86,7 +86,7 @@ pub unsafe fn get(key: Key) -> *mut c_void {
     TlsGetValue(key)
 }
 
-#[cfg(windows)]
+#[cfg(windows, target_arch = "x86")]
 #[abi = "stdcall"]
 extern "stdcall" {
        fn TlsAlloc() -> DWORD;
@@ -94,6 +94,13 @@ extern "stdcall" {
        fn TlsGetValue(dwTlsIndex: DWORD) -> LPVOID;
 }
 
+#[cfg(windows, target_arch = "x86_64")]
+extern {
+       fn TlsAlloc() -> DWORD;
+       fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL;
+       fn TlsGetValue(dwTlsIndex: DWORD) -> LPVOID;
+}
+
 #[test]
 fn tls_smoke_test() {
     use cast::transmute;