| 1 | diff -u -r ../libevent-2.0.22-stable/evutil_rand.c ./evutil_rand.c |
| 2 | --- ../libevent-2.0.22-stable/evutil_rand.c 2013-11-01 14:18:57.000000000 -0400 |
| 3 | +++ ./evutil_rand.c 2016-01-03 20:05:10.168762009 -0500 |
| 4 | @@ -171,10 +171,15 @@ |
| 5 | ev_arc4random_buf(buf, n); |
| 6 | } |
| 7 | |
| 8 | +#ifndef __ANDROID__ |
| 9 | +/* The arc4random_addrandom() has been removed from 64-bit Android libc, |
| 10 | + see https://bugzilla.mozilla.org/show_bug.cgi?id=931354 for motivation |
| 11 | + about just removing this function completely. */ |
| 12 | void |
| 13 | evutil_secure_rng_add_bytes(const char *buf, size_t n) |
| 14 | { |
| 15 | arc4random_addrandom((unsigned char*)buf, |
| 16 | n>(size_t)INT_MAX ? INT_MAX : (int)n); |
| 17 | } |
| 18 | +#endif |
| 19 | |