diff options
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/hurd/getentropy.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/getrandom.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/getentropy.c b/sysdeps/mach/hurd/getentropy.c index d55eec8984..06175d90ce 100644 --- a/sysdeps/mach/hurd/getentropy.c +++ b/sysdeps/mach/hurd/getentropy.c @@ -41,7 +41,7 @@ getentropy (void *buffer, size_t length) while (buffer < end) { /* NB: No cancellation point. */ - ssize_t bytes = getrandom (buffer, end - buffer, 0); + ssize_t bytes = __getrandom (buffer, end - buffer, 0); if (bytes < 0) { if (errno == EINTR) diff --git a/sysdeps/mach/hurd/getrandom.c b/sysdeps/mach/hurd/getrandom.c index 0147aeef3a..8bf42aa40d 100644 --- a/sysdeps/mach/hurd/getrandom.c +++ b/sysdeps/mach/hurd/getrandom.c @@ -24,7 +24,7 @@ /* Write up to LENGTH bytes of randomness starting at BUFFER. Return the number of bytes written, or -1 on error. */ ssize_t -getrandom (void *buffer, size_t length, unsigned int flags) +__getrandom (void *buffer, size_t length, unsigned int flags) { const char *random_source = "/dev/urandom"; size_t amount_read; @@ -41,3 +41,6 @@ getrandom (void *buffer, size_t length, unsigned int flags) __close_nocancel_nostatus(fd); return amount_read; } + +libc_hidden_def (__getrandom) +weak_alias (__getrandom, getrandom) |