diff options
author | Niels Provos <provos@gmail.com> | 2006-09-27 03:18:45 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2006-09-27 03:18:45 +0000 |
commit | 0f33fc5b84ccdd73f6c899a275c11053710682b1 (patch) | |
tree | c00787b3f0323394e656adb68e4b841f917a617c /WIN32-Code/misc.c | |
parent | be392175559cbf39ba906f2bc8ba49d2f9146f97 (diff) | |
download | libevent-patches-1.1.tar.gz |
integrate from trunk: mingw support from Nickpatches-1.1
svn:r236
Diffstat (limited to 'WIN32-Code/misc.c')
-rw-r--r-- | WIN32-Code/misc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/WIN32-Code/misc.c b/WIN32-Code/misc.c index 7329242b..6f63ddfe 100644 --- a/WIN32-Code/misc.c +++ b/WIN32-Code/misc.c @@ -4,6 +4,12 @@ #include <sys/timeb.h> #include <time.h> +#ifdef __GNUC__ +/*our prototypes for timeval and timezone are in here, just in case the above + headers don't have them*/ +#include "misc.h" +#endif + /**************************************************************************** * * Function: gettimeofday(struct timeval *, struct timezone *) @@ -17,6 +23,7 @@ * ****************************************************************************/ +#ifndef HAVE_GETTIMEOFDAY int gettimeofday(struct timeval *tv, struct timezone *tz) { struct _timeb tb; @@ -28,6 +35,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) { tv->tv_usec = ((int) tb.millitm) * 1000; return 0; } +#endif int win_read(int fd, void *buf, unsigned int length) |