From a2605a66fdb8ab18018f3a0f8e49043e73854986 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 3 May 2024 14:17:27 +0100 Subject: 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 --- include/comphelper/random.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/comphelper') 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 -- cgit