Patch libevent to compile for 64-bit archs.
This commit is contained in:
parent
ebe85e55bc
commit
81a945e632
|
@ -132,6 +132,9 @@ openssl-clean:
|
||||||
|
|
||||||
libevent/Makefile:
|
libevent/Makefile:
|
||||||
sed -i 's@\(SUBDIRS = . include\) sample test@\1@' libevent/Makefile.am
|
sed -i 's@\(SUBDIRS = . include\) sample test@\1@' libevent/Makefile.am
|
||||||
|
cp libevent-patch-1 libevent
|
||||||
|
-cd libevent && \
|
||||||
|
patch -N -p1 --reject-file=- < libevent-patch-1
|
||||||
##sed -i 's@\(AC_OUTPUT(Makefile include/Makefile\) test/Makefile sample/Makefile)@\1)@' libevent/configure.in
|
##sed -i 's@\(AC_OUTPUT(Makefile include/Makefile\) test/Makefile sample/Makefile)@\1)@' libevent/configure.in
|
||||||
cd libevent && ./autogen.sh
|
cd libevent && ./autogen.sh
|
||||||
cp config.sub libevent
|
cp config.sub libevent
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
For some reason arc4random_addrandom isn't present in 64-bit android archs. !
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index d42edd8..c511be7 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -290,7 +290,7 @@ AC_HEADER_TIME
|
||||||
|
|
||||||
|
dnl Checks for library functions.
|
||||||
|
AC_CHECK_FUNCS([gettimeofday vasprintf fcntl clock_gettime strtok_r strsep])
|
||||||
|
-AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl])
|
||||||
|
+AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf arc4random_addrandom issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl])
|
||||||
|
AC_CHECK_FUNCS([umask])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(
|
||||||
|
diff --git a/evutil_rand.c b/evutil_rand.c
|
||||||
|
index 284341c..97161e4 100644
|
||||||
|
--- a/evutil_rand.c
|
||||||
|
+++ b/evutil_rand.c
|
||||||
|
@@ -174,7 +174,9 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
|
||||||
|
void
|
||||||
|
evutil_secure_rng_add_bytes(const char *buf, size_t n)
|
||||||
|
{
|
||||||
|
+#ifdef _EVENT_HAVE_ARC4RANDOM_ADDRANDOM
|
||||||
|
arc4random_addrandom((unsigned char*)buf,
|
||||||
|
n>(size_t)INT_MAX ? INT_MAX : (int)n);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue