Index: randombytes.c ================================================================== --- randombytes.c +++ randombytes.c @@ -1,11 +1,11 @@ #include #include #include "randombytes.h" -long getrandom_impl(void *buf, unsigned int buflen); +static long getrandom_impl(void *buf, unsigned int buflen); void randombytes(unsigned char *buffer, unsigned long long length) { long gr_ret; int errorCount = 0; /* @@ -46,11 +46,11 @@ #if defined(HAVE_GETRANDOM) # ifdef HAVE_SYS_RANDOM_H # include # endif -long getrandom_impl(void *buf, unsigned int buflen) { +static long getrandom_impl(void *buf, unsigned int buflen) { ssize_t gr_ret; gr_ret = getrandom(buf, buflen, 0); return(gr_ret); @@ -57,11 +57,11 @@ } #elif defined(HAVE_GETENTROPY) #include -long getrandom_impl(void *buf, unsigned int buflen) { +static long getrandom_impl(void *buf, unsigned int buflen) { int ge_ret; if (buflen > 255) { buflen = 255; } @@ -73,11 +73,11 @@ return(buflen); } #elif defined(HAVE_CRYPTGENRANDOM) && 0 #include -long getrandom_impl(void *buf, unsigned int buflen) { +static long getrandom_impl(void *buf, unsigned int buflen) { Tcl_Panic("Incomplete CryptGenRandom"); } #else # ifdef HAVE_SYS_TYPES_H # include @@ -89,11 +89,11 @@ # include # endif # ifdef HAVE_UNISTD_H # include # endif -long getrandom_impl(void *buf, unsigned int buflen) { +static long getrandom_impl(void *buf, unsigned int buflen) { ssize_t read_ret; long retval; int fd = -1; fd = open("/dev/urandom", O_RDONLY);