view Resources/Patches/openssl-1.1.1f.patch @ 3805:cdb429340112

Fix OpenSSL initialization on Linux Standard Base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 02 Apr 2020 16:45:20 +0200
parents e9834343d327
children
line wrap: on
line source

diff -urEb openssl-1.1.1f.orig/crypto/rand/rand_unix.c openssl-1.1.1f/crypto/rand/rand_unix.c
--- openssl-1.1.1f.orig/crypto/rand/rand_unix.c	2020-03-31 14:17:45.000000000 +0200
+++ openssl-1.1.1f/crypto/rand/rand_unix.c	2020-04-02 16:38:56.091240847 +0200
@@ -445,6 +445,7 @@
              * system call and this should always succeed which renders
              * this alternative but essentially identical source moot.
              */
+#if !defined(__LSB_VERSION__)  // "syscall()" is not available in LSB
             if (uname(&un) == 0) {
                 kernel[0] = atoi(un.release);
                 p = strchr(un.release, '.');
@@ -455,6 +456,7 @@
                     return 0;
                 }
             }
+#endif
             /* Open /dev/random and wait for it to be readable */
             if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) {
                 if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) {