From 8e2b2adb3d0c97c663cf776b28a1f57ffb7fceef Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 18 Mar 2016 21:12:12 +0100 Subject: 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 --- newlib/libc/stdlib/arc4random.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'newlib/libc') diff --git a/newlib/libc/stdlib/arc4random.c b/newlib/libc/stdlib/arc4random.c index 146e1762c..0eeaa2ccd 100644 --- a/newlib/libc/stdlib/arc4random.c +++ b/newlib/libc/stdlib/arc4random.c @@ -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__ */ -- cgit v1.2.3