diff --git a/src/cg_build.c b/src/cg_build.c index 3cd4175..08de3a3 100644 --- a/src/cg_build.c +++ b/src/cg_build.c @@ -1057,7 +1057,7 @@ void __change_schema_signature(dbp, v) static int first_time = 1; if (first_time) { first_time = 0; - srand48_r(&rand); + srand48_r(1, &rand); /* XXX create a portable rand function */ } if (dbp->next_sig == dbp->aDb[0].schema_sig) { u_int8_t n; diff --git a/src/sql_fns.c b/src/sql_fns.c index 49fd504..fcb4968 100644 --- a/src/sql_fns.c +++ b/src/sql_fns.c @@ -356,7 +356,7 @@ __random_func(context, argc, argv) static int first_time = 1; if (first_time) { first_time = 0; - srand48_r(&rand); + srand48_r(1, &rand); /* XXX create a portable rand function */ } rand32_r(&rand, &n); dbsql_set_result_int(context, n); diff --git a/src/vdbe.c b/src/vdbe.c index 3a96d73..7a1389f 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2947,7 +2947,7 @@ case OP_NewRecno: { static int first_time = 1; if (first_time) { first_time = 0; - srand48_r(&rand); + srand48_r(1, &rand); /* XXX create a portable rand function */ } int i = pOp->p1; u_int32_t v = 0;