openbsd-ports/net/livemedia/patches/patch-groupsock_inet_c

15 lines
442 B
Plaintext
Raw Normal View History

$OpenBSD: patch-groupsock_inet_c,v 1.1 2012/02/28 17:55:47 stsp Exp $
--- groupsock/inet.c.orig Sat Feb 4 12:01:47 2012
+++ groupsock/inet.c Sun Feb 26 15:15:55 2012
@@ -61,6 +61,10 @@ int initializeWinsockIfNecessary(void) { return 1; }
long our_random() {
#if defined(__WIN32__) || defined(_WIN32)
return rand();
+#elif defined(__OpenBSD__)
+ long r;
+ arc4random_buf(&r, sizeof(r));
+ return r;
#else
return random();
#endif