Only export arc4random_stir and arc4random_addrandom on Cygwin

Export to maintain backward compatibility, but don't let
	them do anything useful.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-03-18 21:12:12 +01:00
parent d3f203d091
commit 8e2b2adb3d
1 changed files with 5 additions and 8 deletions

View File

@ -194,20 +194,17 @@ arc4random_buf(void *buf, size_t n)
_ARC4_UNLOCK();
}
#ifdef __CYGWIN__
/* Exported functions removed from OpenBSD in the meantime. Keep them,
but make them non-functional. They don't return a value anyway. */
void
arc4random_stir(void)
{
_ARC4_LOCK();
_rs_stir();
_ARC4_UNLOCK();
}
void
arc4random_addrandom(u_char *dat, int datlen)
{
_ARC4_LOCK();
if (!rs)
_rs_stir();
_rs_rekey(dat, datlen);
_ARC4_UNLOCK();
}
#endif /* __CYGWIN__ */