diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-08-03 23:31:22 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-08-03 23:31:22 +0000 |
commit | 849e998ac6c959429ee279a79ee1e5be5d9e7024 (patch) | |
tree | e20aa0901bfa708594587b102e29e4537d8e7129 /src/common | |
parent | e58248df7531d507f55466d84bd4b83ece7d54a0 (diff) | |
download | tor-849e998ac6c959429ee279a79ee1e5be5d9e7024.tar tor-849e998ac6c959429ee279a79ee1e5be5d9e7024.tar.gz |
It is possible to have struct timeval but not gettimeofday.
svn:r2125
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 6 | ||||
-rw-r--r-- | src/common/util.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c index 5ccc58aed..42679a33b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -31,6 +31,12 @@ #include <stdio.h> #include <string.h> #include <assert.h> +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_FTIME +#include <sys/timeb.h> +#endif +#endif + #include "util.h" #include "log.h" #include "crypto.h" diff --git a/src/common/util.h b/src/common/util.h index 0cc08e9a1..2d4702312 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -26,16 +26,12 @@ #elif defined(_MSC_VER) #include <winsock.h> #endif -#ifndef HAVE_GETTIMEOFDAY -#ifdef HAVE_FTIME -#define USING_FAKE_TIMEVAL -#include <sys/timeb.h> +#ifndef HAVE_STRUCT_TIMEVAL_TV_SEC struct timeval { time_t tv_sec; unsigned int tv_usec; }; #endif -#endif #ifdef MS_WINDOWS /* Windows names string functions differently from most other platforms. */ |