diff options
Diffstat (limited to 'www/chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c')
-rw-r--r-- | www/chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/www/chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c b/www/chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c new file mode 100644 index 000000000000..e4e7a5781d0b --- /dev/null +++ b/www/chromium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c @@ -0,0 +1,23 @@ +--- third_party/sqlite/src/amalgamation/sqlite3.c.orig 2022-02-07 13:39:41 UTC ++++ third_party/sqlite/src/amalgamation/sqlite3.c +@@ -40698,7 +40698,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB + memset(zBuf, 0, nBuf); + randomnessPid = osGetpid(0); + #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) ++#if defined(__OpenBSD__) + { ++ arc4random_buf(zBuf, nBuf); ++ } ++#else ++ { + int fd, got; + fd = robust_open("/dev/urandom", O_RDONLY, 0); + if( fd<0 ){ +@@ -40713,6 +40718,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB + robust_close(0, fd, __LINE__); + } + } ++#endif + #endif + return nBuf; + } |