File mozilla-glibc236.patch of Package firefox91

diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/README.mozilla firefox-91.13.0/ipc/chromium/src/third_party/libevent/README.mozilla
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/README.mozilla	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/README.mozilla	2022-08-30 11:12:34.916637042 +0200
@@ -21,6 +21,10 @@ distinguish the two cases. If you get so
 static assertions in message_pump_libevent.cc will fail. If a new constant is
 added, also add a static assertion for it to message_pump_libevent.cc.
 
+You also need to modify the EVENT__HAVE_ARC4RANDOM and EVENT__HAVE_ARC4RANDOM_BUF
+constants in the generated Linux header to account for the results of the arc4random
+and arc4random_buf configure checks.
+
 2. Apply the following patches from
 ipc/chromium/src/third_party/libevent/patches/:
 
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/android/event2/event-config.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/android/event2/event-config.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/android/event2/event-config.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/android/event2/event-config.h	2022-08-30 11:14:08.172674634 +0200
@@ -33,6 +33,9 @@
 /* Define to 1 if you have the `arc4random' function. */
 #define EVENT__HAVE_ARC4RANDOM 1
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+/* #undef EVENT__HAVE_ARC4RANDOM_ADDRANDOM */
+
 /* Define to 1 if you have the `arc4random_buf' function. */
 #if __ANDROID_API__ >= 21 || defined(__ANDROID_API_L__)
 #define EVENT__HAVE_ARC4RANDOM_BUF 1
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/bsd/event2/event-config.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/bsd/event2/event-config.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/bsd/event2/event-config.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/bsd/event2/event-config.h	2022-08-30 11:16:35.620639765 +0200
@@ -31,6 +31,11 @@
 /* Define to 1 if you have the `arc4random' function. */
 #define EVENT__HAVE_ARC4RANDOM 1
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#if defined(__DragonFly__) || defined(__NetBSD__)
+#define EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
+#endif
+
 /* Define to 1 if you have the `arc4random_buf' function. */
 #define EVENT__HAVE_ARC4RANDOM_BUF 1
 
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/event-config.h.cmake firefox-91.13.0/ipc/chromium/src/third_party/libevent/event-config.h.cmake
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/event-config.h.cmake	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/event-config.h.cmake	2022-08-30 11:17:57.612665331 +0200
@@ -53,6 +53,9 @@
 /* Define to 1 if you have the `arc4random_buf' function. */
 #cmakedefine EVENT__HAVE_ARC4RANDOM_BUF
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM
+
 /* Define if clock_gettime is available in libc */
 #cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID
 
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/evutil_rand.c firefox-91.13.0/ipc/chromium/src/third_party/libevent/evutil_rand.c
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/evutil_rand.c	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/evutil_rand.c	2022-08-30 11:18:26.572673437 +0200
@@ -192,7 +192,7 @@ evutil_secure_rng_get_bytes(void *buf, s
 	ev_arc4random_buf(buf, n);
 }
 
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(ANDROID)
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
 void
 evutil_secure_rng_add_bytes(const char *buf, size_t n)
 {
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/include/event2/util.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/include/event2/util.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/include/event2/util.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/include/event2/util.h	2022-08-30 11:15:40.500706534 +0200
@@ -842,7 +842,7 @@ int evutil_secure_rng_init(void);
 EVENT2_EXPORT_SYMBOL
 int evutil_secure_rng_set_urandom_device_file(char *fname);
 
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(ANDROID)
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
 /** Seed the random number generator with extra random bytes.
 
     You should almost never need to call this function; it should be
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h	2022-08-30 11:14:56.572691336 +0200
@@ -26,11 +26,18 @@
 /* Define to 1 if you have the `accept4' function. */
 #define EVENT__HAVE_ACCEPT4 1
 
+#ifdef HAVE_ARC4RANDOM
 /* Define to 1 if you have the `arc4random' function. */
-/* #undef EVENT__HAVE_ARC4RANDOM */
+#define EVENT__HAVE_ARC4RANDOM 1
+#endif
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+/* #undef EVENT__HAVE_ARC4RANDOM_ADDRANDOM */
+
+#ifdef HAVE_ARC4RANDOM_BUF
 /* Define to 1 if you have the `arc4random_buf' function. */
-/* #undef EVENT__HAVE_ARC4RANDOM_BUF */
+#define EVENT__HAVE_ARC4RANDOM_BUF 1
+#endif
 
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #define EVENT__HAVE_ARPA_INET_H 1
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/mac/event2/event-config.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/mac/event2/event-config.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/mac/event2/event-config.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/mac/event2/event-config.h	2022-08-30 11:16:06.964679116 +0200
@@ -29,6 +29,9 @@
 /* Define to 1 if you have the `arc4random' function. */
 #define EVENT__HAVE_ARC4RANDOM 1
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#define EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
+
 /* Define to 1 if you have the `arc4random_buf' function. */
 #define EVENT__HAVE_ARC4RANDOM_BUF 1
 
diff -rup firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h firefox-91.13.0/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h
--- firefox-91.13.0.orig/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h	2022-08-15 20:04:44.000000000 +0200
+++ firefox-91.13.0/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h	2022-08-30 11:14:32.420682996 +0200
@@ -29,6 +29,9 @@
 /* Define to 1 if you have the `arc4random' function. */
 #define EVENT__HAVE_ARC4RANDOM 1
 
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#define EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
+
 /* Define to 1 if you have the `arc4random_buf' function. */
 #define EVENT__HAVE_ARC4RANDOM_BUF 1
 
diff -rup firefox-91.13.0.orig/toolkit/crashreporter/client/ping.cpp firefox-91.13.0/toolkit/crashreporter/client/ping.cpp
--- firefox-91.13.0.orig/toolkit/crashreporter/client/ping.cpp	2022-08-15 20:05:54.000000000 +0200
+++ firefox-91.13.0/toolkit/crashreporter/client/ping.cpp	2022-08-30 11:12:34.920637044 +0200
@@ -53,7 +53,7 @@ static string GenerateUUID() {
 
   CFRelease(uuid);
 #elif defined(HAVE_ARC4RANDOM_BUF)  // Android, BSD, ...
-  arc4random_buf(id, sizeof(UUID));
+  arc4random_buf(&id, sizeof(UUID));
 #else                               // Linux
   int fd = open("/dev/urandom", O_RDONLY);
 
openSUSE Build Service is sponsored by