diff options
author | sobomax <sobomax@FreeBSD.org> | 2005-04-18 00:39:04 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2005-04-18 00:39:04 +0800 |
commit | ffdfad2982c3616e92f9116767d41d8a85d84d81 (patch) | |
tree | ec7ca00b865cfcbacff3fb040881df04b57224a4 /net | |
parent | 8f7c0fc69743cb260951fdf3988ec6dc27039fe5 (diff) | |
download | freebsd-ports-gnome-ffdfad2982c3616e92f9116767d41d8a85d84d81.tar.gz freebsd-ports-gnome-ffdfad2982c3616e92f9116767d41d8a85d84d81.tar.zst freebsd-ports-gnome-ffdfad2982c3616e92f9116767d41d8a85d84d81.zip |
o Add missed statement;
o fix error output.
Diffstat (limited to 'net')
-rw-r--r-- | net/stund/Makefile | 1 | ||||
-rw-r--r-- | net/stund/files/patch-server.cxx | 2 | ||||
-rw-r--r-- | net/stund/files/patch-stun.cxx | 13 |
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() ); } |