comparison configure @ 31367:a5fcacd9ae65

Use a struct timezone as second parameter for gettimeofday in the function test. This works around (broken?) systems where just #including <sys/time.h> does not provide NULL.
author diego
date Wed, 16 Jun 2010 18:27:59 +0000
parents 1fe3bf45f4e6
children d005a8241dec
comparison
equal deleted inserted replaced
31366:0bf908d29807 31367:a5fcacd9ae65
3985 3985
3986 3986
3987 echocheck "gettimeofday()" 3987 echocheck "gettimeofday()"
3988 cat > $TMPC << EOF 3988 cat > $TMPC << EOF
3989 #include <sys/time.h> 3989 #include <sys/time.h>
3990 int main(void) {struct timeval tv_start; gettimeofday(&tv_start, NULL); return 0; } 3990 int main(void) {struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return 0; }
3991 EOF 3991 EOF
3992 _gettimeofday=no 3992 _gettimeofday=no
3993 cc_check && _gettimeofday=yes 3993 cc_check && _gettimeofday=yes
3994 if test "$_gettimeofday" = yes ; then 3994 if test "$_gettimeofday" = yes ; then
3995 def_gettimeofday='#define HAVE_GETTIMEOFDAY 1' 3995 def_gettimeofday='#define HAVE_GETTIMEOFDAY 1'