summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/random.c
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2012-08-17 01:05:56 +0000
committerKevin Lo <kevlo@FreeBSD.org>2012-08-17 01:05:56 +0000
commit8437339e10d2dee2a39a86f5558808ad18648758 (patch)
tree118c2bb5f215c2e0f550592a557a5dab7b2054d4 /lib/libc/stdlib/random.c
parente682d02e1273fc088c0827ba67a5414befed321f (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/random.c')
-rw-r--r--lib/libc/stdlib/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
index f7be4a7186b2..baae078e11e2 100644
--- a/lib/libc/stdlib/random.c
+++ b/lib/libc/stdlib/random.c
@@ -315,7 +315,7 @@ srandomdev()
if (!done) {
struct timeval tv;
- unsigned long junk;
+ volatile unsigned long junk;
gettimeofday(&tv, NULL);
srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);