$OpenBSD: patch-third_party_unrar_src_crypt_cpp,v 1.1 2018/08/11 16:22:42 robert Exp $

Index: third_party/unrar/src/crypt.cpp
--- third_party/unrar/src/crypt.cpp.orig
+++ third_party/unrar/src/crypt.cpp
@@ -124,6 +124,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)
