Exclude arc4random_buf implementation if it's already present in the platform (#1375)

This patch excludes definition of arc4random_buf on systems where it is already present. When the symbol is found, the macro EVENT__HAVE_ARC4RANDOM_BUF is set via CMake's configure_file(..).

Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
This commit is contained in:
Srivatsan Iyer 2022-11-15 12:38:41 +05:30 committed by GitHub
parent cdeb324226
commit 7a18af8c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -471,6 +471,7 @@ arc4random(void)
}
#endif
#ifndef EVENT__HAVE_ARC4RANDOM_BUF
ARC4RANDOM_EXPORT void
arc4random_buf(void *buf_, size_t n)
{
@ -484,6 +485,7 @@ arc4random_buf(void *buf_, size_t n)
}
ARC4_UNLOCK_();
}
#endif /* #ifndef EVENT__HAVE_ARC4RANDOM_BUF */
#ifndef ARC4RANDOM_NOUNIFORM
/*