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.2/Python/random.c.~1~ 2016-06-25 14:38:38.000000000 -0700
+++ Python-3.5.2/Python/random.c 2016-07-08 07:09:56.389742049 -0700
@@ -171,7 +171,7 @@
#endif
if (n < 0) {
- if (errno == ENOSYS) {
+ if (errno == ENOSYS || errno == EINVAL) {
getrandom_works = 0;
return 0;
}