diff options
author | Clinton Bunch <cdb_zsh@zentaur.org> | 2024-08-31 09:10:12 -0500 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2024-08-31 17:22:02 +0200 |
commit | 6b9704e2c4e4c8524137a9c15bf9b166a975f3eb (patch) | |
tree | f796c4b9db4cd7010aa0bd58747cccd161602142 /Src | |
parent | 58bda5913007f53c91ae60cd22483dd222ea5618 (diff) | |
download | zsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.tar.gz zsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.tar.xz zsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.zip |
53060: silence build warnings
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Modules/random.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Modules/random.c b/Src/Modules/random.c index a153d8f64..88ac9543c 100644 --- a/Src/Modules/random.c +++ b/Src/Modules/random.c @@ -62,8 +62,10 @@ ssize_t getrandom_buffer(void *buf, size_t len) { ssize_t ret; +#ifndef HAVE_ARC4RANDOM_BUF size_t val = 0; uint8_t *bufptr = buf; +#endif do { errno = 0; @@ -81,8 +83,10 @@ getrandom_buffer(void *buf, size_t len) return -1; } } +#ifndef HAVE_ARC4RANDOM_BUF bufptr += ret; val += ret; +#endif } while (ret < len); return ret; } |