$OpenBSD: patch-third_party_unrar_src_crypt_cpp,v 1.2 2019/04/17 11:48:55 robert Exp $

Index: third_party/unrar/src/crypt.cpp
--- third_party/unrar/src/crypt.cpp.orig
+++ third_party/unrar/src/crypt.cpp
@@ -125,6 +125,8 @@ void GetRnd(byte *RndBuf,size_t BufSize)
     Success=CryptGenRandom(hProvider, (DWORD)BufSize, RndBuf) == TRUE;
     CryptReleaseContext(hProvider, 0);
   }
+#elif defined(__OpenBSD__)
+  arc4random_buf(RndBuf, BufSize);
 #elif defined(_UNIX)
   FILE *rndf = fopen("/dev/urandom", "r");
   if (rndf!=NULL)
