diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2024-05-03 14:17:27 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2024-05-07 09:51:13 +0200 |
commit | a2605a66fdb8ab18018f3a0f8e49043e73854986 (patch) | |
tree | e36c14196983a9c7575a5558c2ffa839bbf9d524 /include/comphelper | |
parent | 72ea1005b987159a6a59f9379e63321e0b0dd44f (diff) |
lok: reseed comphelper's random number generator on fork.
Also avoid std::random_device it doesn't work in a COOL
kit process.
Change-Id: Ie2d063611a73e734afd92d6fd779f34a2f316230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167070
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/random.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/comphelper/random.hxx b/include/comphelper/random.hxx index 345d57c7158d..1fe4dc5fdf58 100644 --- a/include/comphelper/random.hxx +++ b/include/comphelper/random.hxx @@ -17,6 +17,8 @@ namespace comphelper::rng // These functions obey the SAL_RAND_REPEATABLE environment // variable: If it is set, use a fixed seed. +COMPHELPER_DLLPUBLIC void reseed(); + // note that uniform_int_distribution is inclusive of b, i.e. [a,b] while // uniform_real_distribution is exclusive of b, i.e. [a,b), std::nextafter may be your friend there |