aboutsummaryrefslogtreecommitdiff
path: root/net/stund
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2005-04-17 16:39:04 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2005-04-17 16:39:04 +0000
commitd32a783687e602fc45c78c5c9320a1156564bfd2 (patch)
tree9f71bea4f8ae135b2b5e4e1f08558f478be81e2d /net/stund
parentd048a12f505f49b6314d236f9a3a8c4370580381 (diff)
downloadports-d32a783687e602fc45c78c5c9320a1156564bfd2.tar.gz
ports-d32a783687e602fc45c78c5c9320a1156564bfd2.zip
Notes
Diffstat (limited to 'net/stund')
-rw-r--r--net/stund/Makefile1
-rw-r--r--net/stund/files/patch-server.cxx2
-rw-r--r--net/stund/files/patch-stun.cxx13
3 files changed, 9 insertions, 7 deletions
diff --git a/net/stund/Makefile b/net/stund/Makefile
index 92ca32c9dd49..d6eff7e28322 100644
--- a/net/stund/Makefile
+++ b/net/stund/Makefile
@@ -7,6 +7,7 @@
PORTNAME= stund
PORTVERSION= 0.94
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= stun
diff --git a/net/stund/files/patch-server.cxx b/net/stund/files/patch-server.cxx
index 67cab2ac850d..d732ccdff85b 100644
--- a/net/stund/files/patch-server.cxx
+++ b/net/stund/files/patch-server.cxx
@@ -38,7 +38,7 @@ $FreeBSD$
- }
+ if (background) {
+ if (daemon(0,0) < 0) {
-+ cerr << "demon() call failed" << endl;
++ cerr << "daemon() call failed" << endl;
+ exit(1);
+ }
}
diff --git a/net/stund/files/patch-stun.cxx b/net/stund/files/patch-stun.cxx
index 66bc71a300ca..7e5f00c3aea5 100644
--- a/net/stund/files/patch-stun.cxx
+++ b/net/stund/files/patch-stun.cxx
@@ -1,17 +1,19 @@
$FreeBSD$
---- stun.cxx.orig
+--- stun.cxx
+++ stun.cxx
-@@ -648,55 +648,11 @@
+@@ -648,55 +648,13 @@
stunRand()
{
// return 32 bits of random stuff
- assert( sizeof(int) == 4 );
static bool init=false;
- if ( !init )
+- if ( !init )
- {
-- init = true;
++ if ( !init ) {
++ srandomdev();
+ init = true;
-
- UInt64 tick;
-
@@ -43,7 +45,7 @@ $FreeBSD$
-#else
- srandom(seed);
-#endif
-- }
+ }
-
-#ifdef WIN32
- assert( RAND_MAX == 0x7fff );
@@ -56,7 +58,6 @@ $FreeBSD$
-#else
- return random();
-#endif
-+ srandomdev();
+ /* random() is described as returning 0...2**31-1 */
+ return 0xffffffff & ( ( random() << 31 ) | random() );
}