From 3d163bc544ab9dfc62d9a2c865f8abb865bf6eb3 Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Wed, 29 Feb 2012 22:12:15 +0200 Subject: build: move gettimeofday() emulation to compat Remove all references to gettimeofday() from main project. SIDE EFFECT: mingw will use its own internal gettimeofday(). Signed-off-by: Alon Bar-Lev Acked-by: David Sommerseth Signed-off-by: David Sommerseth --- src/openvpn/misc.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/openvpn/misc.c') diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c index f211a1d..898a183 100644 --- a/src/openvpn/misc.c +++ b/src/openvpn/misc.c @@ -720,7 +720,6 @@ openvpn_popen (const struct argv *a, const struct env_set *es) void init_random_seed(void) { -#ifdef HAVE_GETTIMEOFDAY struct timeval tv; if (!gettimeofday (&tv, NULL)) @@ -728,10 +727,6 @@ init_random_seed(void) const unsigned int seed = (unsigned int) tv.tv_sec ^ tv.tv_usec; srandom (seed); } -#else /* HAVE_GETTIMEOFDAY */ - const time_t current = time (NULL); - srandom ((unsigned int)current); -#endif /* HAVE_GETTIMEOFDAY */ } /* thread-safe strerror */ -- cgit