summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2018-01-02 13:39:18 +0100
committerAnne Jan Brouwer <brouwer@annejan.com>2018-01-02 13:39:18 +0100
commitdf2fd44d158007174e7c067067be98180574b2fa (patch)
tree164d6bb1cb4221a67c1dfeea982dcc9be552b4c1
parentf98648e9845e3bb9328b40b7cb02d3d826847dbb (diff)
forgot init, now testing on 5.9
-rw-r--r--src/pass.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pass.cpp b/src/pass.cpp
index 3da49ab8..d8aaff8d 100644
--- a/src/pass.cpp
+++ b/src/pass.cpp
@@ -287,6 +287,7 @@ quint32 Pass::boundedRandom(quint32 bound) {
const quint32 max_mod_bound = (1 + ~bound) % bound;
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ static int fd = -1;
if (fd == -1) {
assert((fd = open("/dev/urandom", O_RDONLY)) >= 0);
}