From 26e337ed35fc55856142a4e121215036d01a8beb Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 9 Aug 2022 20:42:44 +0000 Subject: [PATCH] Bug 1782988 - Avoid build bustage when building against glibc 2.36 or newer. r=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D153716 Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1782988-Avoid-build-bustage-when-building-agains.patch --- ipc/chromium/src/third_party/libevent/README.mozilla | 4 ++++ .../src/third_party/libevent/linux/event2/event-config.h | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla index c2fcb5a1f42..3518aa6ee53 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 101d39d4551..49864f74006 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 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 header file. */ #define EVENT__HAVE_ARPA_INET_H 1 -- 2.30.2