From ccdb9bec46bcc88549b26a94aa0bae2b9f51031c Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 8 Nov 2013 18:54:38 +1100 Subject: - (dtucker) [openbsd-compat/openbsd-compat.h] Add null implementation of arc4random_stir for platforms that have arc4random but don't have arc4random_stir (right now this is only OpenBSD -current). --- openbsd-compat/openbsd-compat.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'openbsd-compat') diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 392fa38dc..cb007f018 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -1,4 +1,4 @@ -/* $Id: openbsd-compat.h,v 1.58 2013/06/05 22:30:21 dtucker Exp $ */ +/* $Id: openbsd-compat.h,v 1.59 2013/11/08 07:54:39 dtucker Exp $ */ /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. @@ -161,9 +161,13 @@ int writev(int, struct iovec *, int); #ifndef HAVE_GETPEEREID int getpeereid(int , uid_t *, gid_t *); -#endif +#endif -#ifndef HAVE_ARC4RANDOM +#ifdef HAVE_ARC4RANDOM +# ifndef HAVE_ARC4RANDOM_STIR +# define arc4random_stir() +# endif +#else unsigned int arc4random(void); void arc4random_stir(void); #endif /* !HAVE_ARC4RANDOM */ -- cgit v1.2.3