From a067bd488fb1ad0ce4818c6601031554397c1d80 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 21 Jun 2011 17:12:21 +0200 Subject: automatic commit for pwgen-2.03 --- randnum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'randnum.c') diff --git a/randnum.c b/randnum.c index 6afa191..8d88e2d 100644 --- a/randnum.c +++ b/randnum.c @@ -47,7 +47,7 @@ static int get_random_fd(void) #ifdef HAVE_DRAND48 drand48(); #else - rand(); + random(); #endif return fd; } @@ -84,7 +84,7 @@ int pw_random_number(int max_num) /* OK, we weren't able to use /dev/random, fall back to rand/rand48 */ -#ifdef RAND48 +#ifdef HAVE_DRAND48 return ((int) ((drand48() * max_num))); #else return ((int) (random() / ((float) RAND_MAX) * max_num)); -- cgit v1.2.3