summaryrefslogtreecommitdiff
path: root/package/gatling/patches/patch-http_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/gatling/patches/patch-http_c')
-rw-r--r--package/gatling/patches/patch-http_c19
1 files changed, 19 insertions, 0 deletions
diff --git a/package/gatling/patches/patch-http_c b/package/gatling/patches/patch-http_c
new file mode 100644
index 000000000..7e7c9ff93
--- /dev/null
+++ b/package/gatling/patches/patch-http_c
@@ -0,0 +1,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;