]> git.rm.cloudns.org Git - xonotic/d0_blind_id.git/commitdiff
use /dev/urandom
authorRudolf Polzer <divverent@alientrap.org>
Sun, 25 Apr 2010 14:26:10 +0000 (16:26 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 25 Apr 2010 14:26:10 +0000 (16:26 +0200)
d0_bignum-gmp.c

index 93bf0f72154d3c5c5da75de81c58344eb7794434..26414498c6342d6abe68211d9808f82006e0de0c 100644 (file)
@@ -37,7 +37,9 @@ void d0_bignum_INITIALIZE(void)
        d0_bignum_init(&temp);
        gmp_randinit_mt(RANDSTATE);
        gmp_randseed_ui(RANDSTATE, time(NULL));
-       f = fopen("/dev/random", "rb");
+       f = fopen("/dev/urandom", "rb");
+       if(!f)
+               f = fopen("/dev/random", "rb");
        if(f)
        {
                unsigned char buf[256];