Don't use timezone parameter in gettimeofday and settimeofday calls

This commit is contained in:
Miroslav Lichvar
2010-08-12 14:43:26 +02:00
parent 6b0198c2d7
commit 2f2e524bc6
7 changed files with 28 additions and 51 deletions

3
util.c
View File

@@ -506,9 +506,8 @@ UTI_TimevalNetworkToHost(Timeval *src, struct timeval *dest)
is only 32-bit */
if (sizeof (time_t) > 4 && sec_high == TV_NOHIGHSEC) {
struct timeval now;
struct timezone tz;
gettimeofday(&now, &tz);
gettimeofday(&now, NULL);
sec_high = now.tv_sec >> 16 >> 16;
}
dest->tv_sec = (time_t)sec_high << 16 << 16 | sec_low;