mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Fix a compiler warning when checking for arc4random_buf linker breakage.
Patch by Ralph Castain.
This commit is contained in:
parent
5eb178855a
commit
5cb3865a40
@ -76,9 +76,12 @@ ev_arc4random_buf(void *buf, size_t n)
|
|||||||
* and fall back otherwise. (OSX does this using some linker
|
* and fall back otherwise. (OSX does this using some linker
|
||||||
* trickery.)
|
* trickery.)
|
||||||
*/
|
*/
|
||||||
if (arc4random_buf != NULL) {
|
{
|
||||||
|
void (*tptr)() = (void*)arc4random_buf;
|
||||||
|
if (tptr != NULL) {
|
||||||
return arc4random_buf(buf, n);
|
return arc4random_buf(buf, n);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Make sure that we start out with b at a 4-byte alignment; plenty
|
/* Make sure that we start out with b at a 4-byte alignment; plenty
|
||||||
* of CPUs care about this for 32-bit access. */
|
* of CPUs care about this for 32-bit access. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user