about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorClinton Bunch <cdb_zsh@zentaur.org>2024-08-31 09:10:12 -0500
committerOliver Kiddle <opk@zsh.org>2024-08-31 17:22:02 +0200
commit6b9704e2c4e4c8524137a9c15bf9b166a975f3eb (patch)
treef796c4b9db4cd7010aa0bd58747cccd161602142 /Src
parent58bda5913007f53c91ae60cd22483dd222ea5618 (diff)
downloadzsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.tar.gz
zsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.tar.xz
zsh-6b9704e2c4e4c8524137a9c15bf9b166a975f3eb.zip
53060: silence build warnings
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/random.c4
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;
 }