|
发表于 2007-3-16 16:01:06
|
显示全部楼层
你是不是用最新版的 MinGW,我的 MinGW 中的 time.h 没有 gettimeofday.
修改 utils/portable/gettimeofday.h 如下:
[code:1]
/*
gettimeofday.h - portable gettimeofday function for skyeye
Copyright (C) 2007 Skyeye Develop Group
for help please send mail to <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* 03/03/2007 initial version by Anthony Lee
*/
#ifndef __SKYEYE_GETTIMEOFDAY_H__
#define __SKYEYE_GETTIMEOFDAY_H__
#include <sys/time.h> /* for struct timeval */
#define HAVE_GETTIMEOFDAY
#if defined(__MINGW32__)
#include <_mingw.h>
#if (__MINGW32_MAJOR_VERSION < 3)
#undef HAVE_GETTIMEOFDAY
#elif (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 10)
#undef HAVE_GETTIMEOFDAY
#endif
#endif /* defined(__MINGW32__) */
#ifndef HAVE_GETTIMEOFDAY
#if defined(__MINGW32__)
/* we just use timeval, timezone is ignored. */
struct timezone {
};
#endif /* defined(__MINGW32__) */
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif /* HAVE_GETTIMEOFDAY */
#endif /* __SKYEYE_GETTIMEOFDAY_H__ */
[/code:1] |
|