summaryrefslogtreecommitdiff
path: root/net/ns/patches/patch-ar
blob: 345e9b7789079dfac2cd96f7275319b206e936a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-ar,v 1.4 2011/01/29 22:16:51 markd Exp $

Fix build with gcc4.5

--- tools/ranvar.cc.orig	2008-04-01 02:00:25.000000000 +0000
+++ tools/ranvar.cc
@@ -216,7 +216,7 @@ double GammaRandomVariable::value()
 	// ACM Transactions on mathematical software, Vol. 26, No. 3, Sept. 2000
 	if (alpha_ < 1) {
 		double u = rng_->uniform(1.0);
-		return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
+		return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
 	}
 	
 	double x, v, u;