blob: 7e7c9ff939273b2fe66f865c7e2d65ef9892a072 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- gatling-0.16.orig/http.c 2020-11-26 16:36:13.000000000 +0100
+++ gatling-0.16/http.c 2024-02-23 05:17:40.115857819 +0100
@@ -2202,16 +2202,9 @@ static void get_md5_randomness(const uin
static int initialized;
if (!initialized) {
unsigned char buf[16];
-#if defined(__linux__) || defined(__OpenBSD__)
- if (getentropy(buf, sizeof buf)) {
- buffer_putsflush(buffer_2, "getentropy failed (should never happen)\n");
- // carry on with bad randomness
- }
-#else
int fd=open("/dev/urandom",O_RDONLY);
read(fd,buf,16);
close(fd);
-#endif
MD5Init(&md5_ctx);
MD5Update(&md5_ctx,buf,16);
initialized=1;
|