$OpenBSD: patch-src_3rdparty_chromium_third_party_sqlite_src_amalgamation_sqlite3_c,v 1.1 2021/01/19 06:16:35 rsadowski Exp $

Index: src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c
--- src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c.orig
+++ src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c
@@ -39940,7 +39940,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 ){
@@ -39955,6 +39960,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB
       robust_close(0, fd, __LINE__);
     }
   }
+#endif
 #endif
   return nBuf;
 }
