diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /ipc/chromium/src/third_party/libevent/patches | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/chromium/src/third_party/libevent/patches')
4 files changed, 160 insertions, 0 deletions
diff --git a/ipc/chromium/src/third_party/libevent/patches/android-api-level.patch b/ipc/chromium/src/third_party/libevent/patches/android-api-level.patch new file mode 100644 index 0000000000..3bb082db80 --- /dev/null +++ b/ipc/chromium/src/third_party/libevent/patches/android-api-level.patch @@ -0,0 +1,35 @@ +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 +@@ -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. */ ++#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 + + /* Define to 1 if you have the `clock_gettime' function. */ + #define EVENT__HAVE_CLOCK_GETTIME 1 + + /* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you diff --git a/ipc/chromium/src/third_party/libevent/patches/dont-use-issetugid-on-android.patch b/ipc/chromium/src/third_party/libevent/patches/dont-use-issetugid-on-android.patch new file mode 100644 index 0000000000..bdadc84470 --- /dev/null +++ b/ipc/chromium/src/third_party/libevent/patches/dont-use-issetugid-on-android.patch @@ -0,0 +1,22 @@ +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 +@@ -134,17 +134,17 @@ + + /* Define to 1 if you have the `inet_pton' function. */ + #define EVENT__HAVE_INET_PTON 1 + + /* Define to 1 if you have the <inttypes.h> header file. */ + #define EVENT__HAVE_INTTYPES_H 1 + + /* Define to 1 if you have the `issetugid' function. */ +-#define EVENT__HAVE_ISSETUGID 1 ++/* #undef EVENT__HAVE_ISSETUGID */ + + /* Define to 1 if you have the `kqueue' function. */ + /* #undef EVENT__HAVE_KQUEUE */ + + /* Define if the system has zlib */ + #define EVENT__HAVE_LIBZ 1 + + /* Define to 1 if you have the `mach_absolute_time' function. */ diff --git a/ipc/chromium/src/third_party/libevent/patches/linux-no-sysctl.patch b/ipc/chromium/src/third_party/libevent/patches/linux-no-sysctl.patch new file mode 100644 index 0000000000..a47132fb92 --- /dev/null +++ b/ipc/chromium/src/third_party/libevent/patches/linux-no-sysctl.patch @@ -0,0 +1,41 @@ +diff --git a/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h b/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h +--- a/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h ++++ b/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h +@@ -290,17 +290,17 @@ + + /* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ + /* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ + + /* Define to 1 if the system has the type `struct so_linger'. */ + #define EVENT__HAVE_STRUCT_SO_LINGER 1 + + /* Define to 1 if you have the `sysctl' function. */ +-#define EVENT__HAVE_SYSCTL 1 ++/* #undef EVENT__HAVE_SYSCTL */ + + /* Define to 1 if you have the <sys/devpoll.h> header file. */ + /* #undef EVENT__HAVE_SYS_DEVPOLL_H */ + + /* Define to 1 if you have the <sys/epoll.h> header file. */ + #define EVENT__HAVE_SYS_EPOLL_H 1 + + /* Define to 1 if you have the <sys/eventfd.h> header file. */ +@@ -332,17 +332,17 @@ + + /* Define to 1 if you have the <sys/socket.h> header file. */ + #define EVENT__HAVE_SYS_SOCKET_H 1 + + /* Define to 1 if you have the <sys/stat.h> header file. */ + #define EVENT__HAVE_SYS_STAT_H 1 + + /* Define to 1 if you have the <sys/sysctl.h> header file. */ +-#define EVENT__HAVE_SYS_SYSCTL_H 1 ++/* #undef EVENT__HAVE_SYS_SYSCTL_H */ + + /* Define to 1 if you have the <sys/timerfd.h> header file. */ + #define EVENT__HAVE_SYS_TIMERFD_H 1 + + /* Define to 1 if you have the <sys/time.h> header file. */ + #define EVENT__HAVE_SYS_TIME_H 1 + + /* Define to 1 if you have the <sys/types.h> header file. */ diff --git a/ipc/chromium/src/third_party/libevent/patches/openbsd-no-arc4random_addrandom.patch b/ipc/chromium/src/third_party/libevent/patches/openbsd-no-arc4random_addrandom.patch new file mode 100644 index 0000000000..cbb77be7e0 --- /dev/null +++ b/ipc/chromium/src/third_party/libevent/patches/openbsd-no-arc4random_addrandom.patch @@ -0,0 +1,62 @@ +diff --git a/ipc/chromium/src/third_party/libevent/evutil_rand.c b/ipc/chromium/src/third_party/libevent/evutil_rand.c +--- a/ipc/chromium/src/third_party/libevent/evutil_rand.c ++++ b/ipc/chromium/src/third_party/libevent/evutil_rand.c +@@ -187,20 +187,22 @@ ev_arc4random_buf(void *buf, size_t n) + #endif /* } !EVENT__HAVE_ARC4RANDOM */ + + void + evutil_secure_rng_get_bytes(void *buf, size_t n) + { + ev_arc4random_buf(buf, n); + } + ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(ANDROID) + void + evutil_secure_rng_add_bytes(const char *buf, size_t n) + { + arc4random_addrandom((unsigned char*)buf, + n>(size_t)INT_MAX ? INT_MAX : (int)n); + } ++#endif + + void + evutil_free_secure_rng_globals_(void) + { + evutil_free_secure_rng_globals_locks(); + } +diff --git a/ipc/chromium/src/third_party/libevent/include/event2/util.h b/ipc/chromium/src/third_party/libevent/include/event2/util.h +--- a/ipc/chromium/src/third_party/libevent/include/event2/util.h ++++ b/ipc/chromium/src/third_party/libevent/include/event2/util.h +@@ -837,30 +837,32 @@ int evutil_secure_rng_init(void); + * user of the secure RNG might be running. Don't pass anything other than a + * real /dev/...random device file here, or you might lose security.) + * + * This API is unstable, and might change in a future libevent version. + */ + EVENT2_EXPORT_SYMBOL + int evutil_secure_rng_set_urandom_device_file(char *fname); + ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(ANDROID) + /** Seed the random number generator with extra random bytes. + + You should almost never need to call this function; it should be + sufficient to invoke evutil_secure_rng_init(), or let Libevent take + care of calling evutil_secure_rng_init() on its own. + + If you call this function as a _replacement_ for the regular + entropy sources, then you need to be sure that your input + contains a fairly large amount of strong entropy. Doing so is + notoriously hard: most people who try get it wrong. Watch out! + + @param dat a buffer full of a strong source of random numbers + @param datlen the number of bytes to read from datlen + */ + EVENT2_EXPORT_SYMBOL + void evutil_secure_rng_add_bytes(const char *dat, size_t datlen); ++#endif + + #ifdef __cplusplus + } + #endif + + #endif /* EVENT1_EVUTIL_H_INCLUDED_ */ |