Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1624)

Unified Diff: mozilla/security/nss/lib/freebl/unix_rand.c

Issue 12197027: Merge NSS_3_14_2_RTM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mozilla/security/nss/lib/freebl/rijndael.c ('k') | mozilla/security/nss/lib/libpkix/include/pkix_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla/security/nss/lib/freebl/unix_rand.c
===================================================================
--- mozilla/security/nss/lib/freebl/unix_rand.c (revision 180567)
+++ mozilla/security/nss/lib/freebl/unix_rand.c (working copy)
@@ -193,12 +193,7 @@
#if defined(__sun)
#if defined(__svr4) || defined(SVR4)
#include <sys/systeminfo.h>
-#include <sys/times.h>
-#include <wait.h>
-int gettimeofday(struct timeval *);
-int gethostname(char *, int);
-
#define getdtablesize() sysconf(_SC_OPEN_MAX)
static void
@@ -363,10 +358,12 @@
static void
GiveSystemInfo(void)
{
+#ifndef NO_SYSINFO
struct sysinfo si;
if (sysinfo(&si) == 0) {
RNG_RandomUpdate(&si, sizeof(si));
}
+#endif
}
#endif /* LINUX */
@@ -672,11 +669,7 @@
n = GetHighResClock(buf, maxbytes);
maxbytes -= n;
-#if defined(__sun) && (defined(_svr4) || defined(SVR4)) || defined(sony)
- (void)gettimeofday(&tv);
-#else
(void)gettimeofday(&tv, 0);
-#endif
c = CopyLowBits((char*)buf+n, maxbytes, &tv.tv_usec, sizeof(tv.tv_usec));
n += c;
maxbytes -= c;
« no previous file with comments | « mozilla/security/nss/lib/freebl/rijndael.c ('k') | mozilla/security/nss/lib/libpkix/include/pkix_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698