diff --git a/src/h/rproto.h b/src/h/rproto.h index eb11a33f2..0cecd8e6c 100644 --- a/src/h/rproto.h +++ b/src/h/rproto.h @@ -279,6 +279,7 @@ int fldlookup (struct b_record *rec, const char * const fld); void fpetrap (void); int getenv_r (const char *name, char *buf, size_t len); +word unicon_getrandom(void); int getvar (char *s,dptr vp); int getkeyword (char *s, dptr vp); diff --git a/src/runtime/fmisc.r b/src/runtime/fmisc.r index c738b4e1d..c9112586e 100644 --- a/src/runtime/fmisc.r +++ b/src/runtime/fmisc.r @@ -2842,7 +2842,7 @@ body { /* Revert to built-in rngIcon */ curtstate->rng = NULL; curtstate->Kywd_ran = zerodesc; - IntVal(curtstate->Kywd_ran) = getrandom(); /* Reinitialize */ + IntVal(curtstate->Kywd_ran) = unicon_getrandom(); /* Reinitialize */ } else { #ifndef Arrays /* The rng state is stored as an array of integers */ @@ -2958,7 +2958,7 @@ body { /* Call startRng */ { struct rng_rt_api api; - api.getInitialBits = getrandom; + api.getInitialBits = unicon_getrandom; api.getRngState = getRngState; api.putErrorCode = putErrorCode; diff --git a/src/runtime/init.r b/src/runtime/init.r index 54e7c3e70..e6185d164 100644 --- a/src/runtime/init.r +++ b/src/runtime/init.r @@ -15,7 +15,6 @@ static FILE * readhdr (char *name, struct header *hdr); /* * Prototypes. */ -static word unicon_getrandom(void); static void env_err (char *msg, char *name, char *val); FILE *pathOpen (char *fname, char *mode); @@ -1675,7 +1674,7 @@ int err() return strcmp(a->pstrep, b->pstrep); } -static word unicon_getrandom(void) +word unicon_getrandom() { #ifndef NoRandomize /*