diff options
Diffstat (limited to 'www/chromium/files/patch-base_rand__util__posix.cc')
-rw-r--r-- | www/chromium/files/patch-base_rand__util__posix.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/www/chromium/files/patch-base_rand__util__posix.cc b/www/chromium/files/patch-base_rand__util__posix.cc index 1b2a99d867ab..903da2cdc4db 100644 --- a/www/chromium/files/patch-base_rand__util__posix.cc +++ b/www/chromium/files/patch-base_rand__util__posix.cc @@ -1,6 +1,6 @@ ---- base/rand_util_posix.cc.orig 2024-03-22 08:19:40 UTC +--- base/rand_util_posix.cc.orig 2024-06-17 12:56:06 UTC +++ base/rand_util_posix.cc -@@ -23,7 +23,7 @@ +@@ -28,7 +28,7 @@ #include "base/time/time.h" #include "build/build_config.h" @@ -8,8 +8,8 @@ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) - // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -40,6 +40,7 @@ namespace base { + // TODO(crbug.com/40641285): Waiting for this header to appear in the iOS SDK. +@@ -45,6 +45,7 @@ namespace base { namespace { @@ -17,7 +17,7 @@ #if BUILDFLAG(IS_AIX) // AIX has no 64-bit support for O_CLOEXEC. static constexpr int kOpenFlags = O_RDONLY; -@@ -64,10 +65,11 @@ class URandomFd { +@@ -69,10 +70,11 @@ class URandomFd { private: const int fd_; }; @@ -30,15 +30,15 @@ // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc -@@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() { +@@ -182,6 +184,7 @@ bool UseBoringSSLForRandBytes() { namespace { - void RandBytes(span<uint8_t> output, bool avoid_allocation) { + void RandBytesInternal(span<uint8_t> output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { -@@ -215,6 +218,9 @@ void RandBytes(span<uint8_t> output, bool avoid_alloca +@@ -220,6 +223,9 @@ void RandBytesInternal(span<uint8_t> output, bool avoi const int urandom_fd = GetUrandomFD(); const bool success = ReadFromFD(urandom_fd, as_writable_chars(output)); CHECK(success); @@ -48,8 +48,8 @@ } } // namespace -@@ -239,9 +245,11 @@ void RandBytes(void* output, size_t output_length) { - RandBytes(make_span(static_cast<uint8_t*>(output), output_length)); +@@ -239,9 +245,11 @@ void RandBytes(span<uint8_t> output) { + RandBytesInternal(output, /*avoid_allocation=*/false); } +#if !BUILDFLAG(IS_BSD) |