summaryrefslogtreecommitdiff
path: root/dist/fontconfig/src
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2013-09-01 19:47:54 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2013-09-01 19:47:54 +0000
commit1df1a9ab202aeea4ceb0fa191ed2dd1d7bbb3f4e (patch)
treef549fdad169c9a61afbc2184e3270d0fbc33b7e3 /dist/fontconfig/src
parentf0b719883328e4b23aea03eb59056872c323484a (diff)
use arc4random() as the preferred random number source in fontconfig
ok matthieu@
Diffstat (limited to 'dist/fontconfig/src')
-rw-r--r--dist/fontconfig/src/fccache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dist/fontconfig/src/fccache.c b/dist/fontconfig/src/fccache.c
index 610b8f0b7..1acaec6a9 100644
--- a/dist/fontconfig/src/fccache.c
+++ b/dist/fontconfig/src/fccache.c
@@ -258,7 +258,9 @@ FcRandom(void)
{
int32_t result;
-#if HAVE_RANDOM_R
+#if HAVE_ARC4RANDOM
+ result = arc4random() & 0x7fffffff;
+#elif HAVE_RANDOM_R
static struct random_data fcrandbuf;
static char statebuf[256];
static FcBool initialized = FcFalse;