Files
ports/devel/electron43/files/patch-third__party_unrar_src_crypt.cpp
2026-10-04 04:07:15 +00:00

12 lines
429 B
C++

--- third_party/unrar/src/crypt.cpp.orig 2026-03-13 16:54:03 UTC
+++ third_party/unrar/src/crypt.cpp
@@ -123,6 +123,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)