This patch was originated in-house. It is to work around a bug (21825650)
in getrandom(2). That bug was fixed in S12, and in an 11.3 SRU, but not in
time for 11.3 GA, so this patch is still needed for FOSS Evaluation builds.
--- Python-3.5.3/Python/random.c.~1~ 2017-01-17 11:31:43.712295534 +0000
+++ Python-3.5.3/Python/random.c 2017-01-17 11:34:15.498815511 +0000
@@ -185,7 +185,7 @@
/* ENOSYS: getrandom() syscall not supported by the kernel (but
* maybe supported by the host which built Python). EPERM:
* getrandom() syscall blocked by SECCOMP or something else. */
- if (errno == ENOSYS || errno == EPERM) {
+ if (errno == ENOSYS || errno == EINVAL || errno == EPERM) {
getrandom_works = 0;
return 0;
}