ladybird/Ports/python-3.6/patches/0005-Use-dev-random-instead-of-dev-urandom.patch
Emanuel Sprung 71823a6c49 Ports: Add initial Python 3.6 port
This port is experimental and not all pythom modules are working.
But this is an initial shot which can be further worked on, as
SerenityOS gets more mature. :^)

The main limitation is that locales, threading and time related
functions are not working.
2019-11-11 22:04:16 +01:00

16 lines
442 B
Diff

diff --git a/Python/random.c b/Python/random.c
index 46e3bb5..a4a7136 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -316,7 +316,7 @@ dev_urandom(char *buffer, Py_ssize_t size, int blocking, int raise)
} while (0 < size);
}
else {
- fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
+ fd = _Py_open_noraise("/dev/random", O_RDONLY);
if (fd < 0) {
return -1;
}
--
2.17.1