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/compat/compat.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/compat/compat.h') diff --git a/src/compat/compat.h b/src/compat/compat.h index 57754da..3f9ac31 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -25,6 +25,15 @@ #ifndef COMPAT_H #define COMPAT_H +#ifdef HAVE_WINSOCK2_H +/* timeval */ +#include +#endif + +#ifdef HAVE_SYS_TIME_H +#include +#endif + #ifndef HAVE_DIRNAME char * dirname(char *str); #endif /* HAVE_DIRNAME */ @@ -33,4 +42,8 @@ char * dirname(char *str); char * basename(char *str); #endif /* HAVE_BASENAME */ +#ifndef HAVE_GETTIMEOFDAY +int gettimeofday (struct timeval *tv, void *tz); +#endif + #endif /* COMPAT_H */ -- cgit