зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1428182 - 5. Update libevent patch for Android builds; r=froydnj
Support for accept4 and arc4random_buf depends on which set of NDK headers we're using. accept4 is supported for API >= 21 for unified and non-unified headers. arc4random_buf is supported for API >= 21 if using non-unified headers, and it's always supported if using unified headers (the unified headers provide shims for API < 21). MozReview-Commit-ID: FY8n5jWXB1K --HG-- rename : ipc/chromium/src/third_party/libevent/patches/android-arc4random-buf.patch => ipc/chromium/src/third_party/libevent/patches/android-api-level.patch extra : rebase_source : a8974cb1e8e71a8c951754ca9902fff28c099031
This commit is contained in:
Родитель
d2f6bcce0c
Коммит
dbaea867e2
|
@ -34,5 +34,5 @@ ipc/chromium/src/third_party/libevent/patches/:
|
|||
- "linux-no-sysctl.patch". Fixes the build on Linux systems without sysctl.h.
|
||||
See bug 1263429.
|
||||
|
||||
- "android-arc4random-buf.patch". Fixes the build for clang/android builds.
|
||||
See bug 1281596 and bug 1282141.
|
||||
- "android-api-level.patch". Fixes the build under clang or NDK r16.
|
||||
See bug 1281596, bug 1282141, and bug 1428182.
|
||||
|
|
|
@ -24,13 +24,21 @@
|
|||
/* #undef EVENT__DISABLE_THREAD_SUPPORT */
|
||||
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
#if __ANDROID_API__ >= 21
|
||||
#define EVENT__HAVE_ACCEPT4 1
|
||||
#else
|
||||
/* #undef EVENT__HAVE_ACCEPT4 */
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `arc4random' function. */
|
||||
#define EVENT__HAVE_ARC4RANDOM 1
|
||||
|
||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||
#if __ANDROID_API__ >= 21 || defined(__ANDROID_API_L__)
|
||||
#define EVENT__HAVE_ARC4RANDOM_BUF 1
|
||||
#else
|
||||
/* #undef EVENT__HAVE_ARC4RANDOM_BUF */
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define EVENT__HAVE_ARPA_INET_H 1
|
||||
|
|
|
@ -1,17 +1,30 @@
|
|||
diff --git a/ipc/chromium/src/third_party/libevent/android/event2/event-config.h b/ipc/chromium/src/third_party/libevent/android/event2/event-config.h
|
||||
--- a/ipc/chromium/src/third_party/libevent/android/event2/event-config.h
|
||||
+++ b/ipc/chromium/src/third_party/libevent/android/event2/event-config.h
|
||||
@@ -25,17 +25,17 @@
|
||||
@@ -19,23 +19,31 @@
|
||||
|
||||
/* Define if libevent should not allow replacing the mm functions */
|
||||
/* #undef EVENT__DISABLE_MM_REPLACEMENT */
|
||||
|
||||
/* Define if libevent should not be compiled with thread support */
|
||||
/* #undef EVENT__DISABLE_THREAD_SUPPORT */
|
||||
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
+#if __ANDROID_API__ >= 21
|
||||
#define EVENT__HAVE_ACCEPT4 1
|
||||
+#else
|
||||
+/* #undef EVENT__HAVE_ACCEPT4 */
|
||||
+#endif
|
||||
|
||||
/* Define to 1 if you have the `arc4random' function. */
|
||||
#define EVENT__HAVE_ARC4RANDOM 1
|
||||
|
||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||
-#define EVENT__HAVE_ARC4RANDOM_BUF 1
|
||||
+#if __ANDROID_API__ >= 21 || defined(__ANDROID_API_L__)
|
||||
#define EVENT__HAVE_ARC4RANDOM_BUF 1
|
||||
+#else
|
||||
+/* #undef EVENT__HAVE_ARC4RANDOM_BUF */
|
||||
+#endif
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define EVENT__HAVE_ARPA_INET_H 1
|
Загрузка…
Ссылка в новой задаче