diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-07-14 01:43:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-07-14 10:15:07 -0700 |
| commit | 9fd2ac7428afa4f414f32b8b4876ca817ee85f16 (patch) | |
| tree | d95eb9acc27f980f2365330b3aa9566e8eec2010 /src/libstd/rand.rs | |
| parent | e3211fa1f1f24268b91b0c89cb312e70499d41f3 (diff) | |
| download | rust-9fd2ac7428afa4f414f32b8b4876ca817ee85f16.tar.gz rust-9fd2ac7428afa4f414f32b8b4876ca817ee85f16.zip | |
Make TLS keys actually take up space
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
Diffstat (limited to 'src/libstd/rand.rs')
| -rw-r--r-- | src/libstd/rand.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rand.rs b/src/libstd/rand.rs index 8551012d6d7..6f89e7ffb07 100644 --- a/src/libstd/rand.rs +++ b/src/libstd/rand.rs @@ -854,7 +854,7 @@ pub fn seed() -> ~[u8] { #[cfg(stage0)] fn tls_rng_state(_v: @@mut IsaacRng) {} #[cfg(not(stage0))] -static tls_rng_state: local_data::Key<@@mut IsaacRng> = &[]; +static tls_rng_state: local_data::Key<@@mut IsaacRng> = &local_data::Key; /** * Gives back a lazily initialized task-local random number generator, |
