components/python/python35/patches/26-getrandom.patch
changeset 6447 56a2f066191a
parent 5199 36df3dbf2f0f
child 7648 20e09cf3cfaa
equal deleted inserted replaced
6446:b54de573b4e9 6447:56a2f066191a
     1 This patch was originated in-house.  It is to work around a bug (21825650)
     1 This patch was originated in-house.  It is to work around a bug (21825650)
     2 in getrandom(2).  That bug was fixed in S12, and in an 11.3 SRU, but not in
     2 in getrandom(2).  That bug was fixed in S12, and in an 11.3 SRU, but not in
     3 time for 11.3 GA, so this patch is still needed for FOSS Evaluation builds.
     3 time for 11.3 GA, so this patch is still needed for FOSS Evaluation builds.
     4 
     4 
     5 --- Python-3.5.1/Python/random.c.~1~	2015-08-25 10:19:14.000000000 -0700
     5 --- Python-3.5.2/Python/random.c.~1~	2016-06-25 14:38:38.000000000 -0700
     6 +++ Python-3.5.1/Python/random.c	2015-09-02 14:18:51.799090171 -0700
     6 +++ Python-3.5.2/Python/random.c	2016-07-08 07:09:56.389742049 -0700
     7 @@ -136,7 +136,7 @@
     7 @@ -171,7 +171,7 @@
     8          }
     8  #endif
     9  
     9  
    10          if (n < 0) {
    10          if (n < 0) {
    11 -            if (errno == ENOSYS) {
    11 -            if (errno == ENOSYS) {
    12 +            if (errno == ENOSYS || errno == EINVAL) {
    12 +            if (errno == ENOSYS || errno == EINVAL) {
    13                  getrandom_works = 0;
    13                  getrandom_works = 0;