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:
parent
d3f203d091
commit
8e2b2adb3d
|
@ -194,20 +194,17 @@ arc4random_buf(void *buf, size_t n)
|
||||||
_ARC4_UNLOCK();
|
_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
|
void
|
||||||
arc4random_stir(void)
|
arc4random_stir(void)
|
||||||
{
|
{
|
||||||
_ARC4_LOCK();
|
|
||||||
_rs_stir();
|
|
||||||
_ARC4_UNLOCK();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
arc4random_addrandom(u_char *dat, int datlen)
|
arc4random_addrandom(u_char *dat, int datlen)
|
||||||
{
|
{
|
||||||
_ARC4_LOCK();
|
|
||||||
if (!rs)
|
|
||||||
_rs_stir();
|
|
||||||
_rs_rekey(dat, datlen);
|
|
||||||
_ARC4_UNLOCK();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* __CYGWIN__ */
|
||||||
|
|
Loading…
Reference in New Issue