Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-03-18 23:12:12 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-03-18 23:12:12 +0300
commit8e2b2adb3d0c97c663cf776b28a1f57ffb7fceef (patch)
tree181fac8b76ceb386f5b2969fcffb5fdf2664a8c6 /newlib/libc
parentd3f203d091af5f54f4f5c3f6d15a3e03e5aef6c9 (diff)
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>
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/stdlib/arc4random.c13
1 files changed, 5 insertions, 8 deletions
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__ */