summaryrefslogtreecommitdiff
path: root/devel/electron36/files/patch-third__party_unrar_src_crypt.cpp
blob: 3ce2532bda1f2f37117f41235e5e8451d4ce0ca6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- third_party/unrar/src/crypt.cpp.orig	2024-08-14 20:56:02 UTC
+++ third_party/unrar/src/crypt.cpp
@@ -116,6 +116,8 @@ void GetRnd(byte *RndBuf,size_t BufSize)
     Success=CryptGenRandom(hProvider, (DWORD)BufSize, RndBuf) != FALSE;
     CryptReleaseContext(hProvider, 0);
   }
+#elif defined(__OpenBSD__)
+  arc4random_buf(RndBuf, BufSize);
 #elif defined(_UNIX)
   FILE *rndf = fopen("/dev/urandom", "r");
   if (rndf!=NULL)