summaryrefslogtreecommitdiffstats
path: root/src/util/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/rand.c')
-rw-r--r--src/util/rand.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/util/rand.c b/src/util/rand.c
index 2ed0605..2b137a5 100644
--- a/src/util/rand.c
+++ b/src/util/rand.c
@@ -10,10 +10,6 @@ See <http://creativecommons.org/publicdomain/zero/1.0/>. */
#include "rand.h"
#include "runtime.h"
-#if defined(GIT_RAND_GETENTROPY)
-# include <sys/random.h>
-#endif
-
#if defined(GIT_WIN32)
# include <wincrypt.h>
#endif
@@ -80,10 +76,10 @@ GIT_INLINE(int) getseed(uint64_t *seed)
GIT_INLINE(int) getseed(uint64_t *seed)
{
struct timeval tv;
- double loadavg[3];
int fd;
# if defined(GIT_RAND_GETLOADAVG)
+ double loadavg[3];
bits convert;
# endif
@@ -129,8 +125,6 @@ GIT_INLINE(int) getseed(uint64_t *seed)
convert.f = loadavg[0]; *seed ^= (convert.d >> 36);
convert.f = loadavg[1]; *seed ^= (convert.d);
convert.f = loadavg[2]; *seed ^= (convert.d >> 16);
-# else
- GIT_UNUSED(loadavg[0]);
# endif
*seed ^= git_time_monotonic();