Browse Source

fix killentropy patch

Bill Gianopoulos 3 years ago
parent
commit
a5f4d235dd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      mozilla-central/patches/PPPPPPP-killgetentropy.patch

+ 2 - 2
mozilla-central/patches/PPPPPPP-killgetentropy.patch

@@ -18,8 +18,8 @@ diff --git a/security/nss/lib/freebl/unix_urandom.c b/security/nss/lib/freebl/un
      size_t fileBytes = 0;
      unsigned char *buffer = dest;
  
-+#if 0
  #if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || (defined(LINUX) && defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 25))))
++  #if
      int result;
  
      while (fileBytes < maxLen) {
@@ -35,8 +35,8 @@ diff --git a/security/nss/lib/freebl/unix_urandom.c b/security/nss/lib/freebl/un
      /* ENOSYS means the kernel doesn't support getentropy()/getrandom().
       * Reset the number of bytes to get and fall back to /dev/urandom. */
      fileBytes = 0;
++  #endif
  #endif
-+#endif
      fd = open("/dev/urandom", O_RDONLY);
      if (fd < 0) {
          PORT_SetError(SEC_ERROR_NEED_RANDOM);