summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2024-05-03 14:17:27 +0100
committerMichael Meeks <michael.meeks@collabora.com>2024-05-03 19:54:47 +0200
commit6d9228d6b14d968fa92df3ca018a555f8652e579 (patch)
treeacaf5987ba2a1ed55c55116024d9a767984f6316 /include
parent0221a983601abf5efbacdb1b83e31283e66be743 (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/+/167058 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/random.hxx2
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