From 97dababa47e5b2133f18f05f415dcf42c7066f84 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 28 Mar 2013 22:20:40 +0200 Subject: [PATCH] Fix the gettimeofday_timezone test. --- nt/inc/sys/time.h | 4 +++- src/w32.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index aa51041bcd..391898ef12 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -35,7 +35,9 @@ struct timezone }; #endif -void gettimeofday (struct timeval *, struct timezone *); +/* This needs to be compatible with Posix signature, in order to pass + the configure test for the type of the second argument. */ +int gettimeofday (struct timeval *, struct timezone *); #define ITIMER_REAL 0 #define ITIMER_PROF 1 diff --git a/src/w32.c b/src/w32.c index 431826c4b8..6933ddfed8 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2394,7 +2394,7 @@ get_emacs_configuration_options (void) #include /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ -void +int gettimeofday (struct timeval *tv, struct timezone *tz) { struct _timeb tb; @@ -2413,6 +2413,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz) tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ tz->tz_dsttime = tb.dstflag; /* type of dst correction */ } + return 0; } /* Emulate fdutimens. */ -- 2.20.1