summaryrefslogtreecommitdiff
path: root/net/stund/patches/patch-stun.cxx
blob: bf84634b11c3d83b10ce336aa278e11d4c1d2236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-stun.cxx,v 1.1 2017/12/06 15:43:48 jmcneill Exp $

--- stun.cxx.orig	2012-01-26 11:02:46.000000000 +0000
+++ stun.cxx
@@ -673,12 +673,10 @@ stunRand()
       asm("rdtsc" : "=A" (tick));
 #elif defined (__SUNPRO_CC) || defined( __sparc__ )	
       tick = gethrtime();
-#elif defined(__MACH__)  || defined(__linux)
-      int fd=open("/dev/random",O_RDONLY);
+#else
+      int fd=open("/dev/urandom",O_RDONLY);
       read(fd,&tick,sizeof(tick));
       closesocket(fd);
-#else
-#     error Need some way to seed the random number generator 
 #endif 
       int seed = int(tick);
 #ifdef WIN32