mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
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:
parent
cdeb324226
commit
7a18af8c8e
@ -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
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user