diff --git a/mozilla/xpcom/base/nsUUIDGenerator.cpp b/mozilla/xpcom/base/nsUUIDGenerator.cpp index b9cffc6cc4c..2f3c6cd7e75 100644 --- a/mozilla/xpcom/base/nsUUIDGenerator.cpp +++ b/mozilla/xpcom/base/nsUUIDGenerator.cpp @@ -90,6 +90,11 @@ nsUUIDGenerator::Init() bytes += nbytes; } + // call random once for the side effect of initializing + // glibc's internal state, so that initstate doesn't + // return NULL + random(); + /* Initialize a new RNG state, and immediately switch * back to the previous one -- we want to use mState * only for our own calls to random().