summarylogtreecommitdiffstats
path: root/glibc236.patch
blob: c89b6bde21b5b842796735b480dd97ed7b75c804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla
index c2fcb5a1f424..3518aa6ee534 100644
--- a/ipc/chromium/src/third_party/libevent/README.mozilla
+++ b/ipc/chromium/src/third_party/libevent/README.mozilla
@@ -22,6 +22,10 @@ distinguish the two cases. If you get something wrong, the CHECK_EVENT_SIZEOF
 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. No additional patches are needed at this time, but be careful to avoid
 clobbering changes to the various event-config.h files which have been customized
 over time to avoid various build bustages.
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
index 101d39d45510..49864f74006f 100644
--- a/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h
+++ b/ipc/chromium/src/third_party/libevent/linux/event2/event-config.h
@@ -29,14 +29,18 @@
 /* Define to 1 if you have the <afunix.h> header file. */
 /* #undef EVENT__HAVE_AFUNIX_H 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 --git a/toolkit/crashreporter/client/ping.cpp b/toolkit/crashreporter/client/ping.cpp
index 49c6e2b7361c..0d803841987d 100644
--- a/toolkit/crashreporter/client/ping.cpp
+++ b/toolkit/crashreporter/client/ping.cpp
@@ -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);