diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/aarch64/gettimeofday.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/gettimeofday.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c b/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c index 9180b50bf7..47330e2f83 100644 --- a/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c @@ -35,7 +35,9 @@ static int __gettimeofday_vsyscall (struct timeval *tv, struct timezone *tz) { - return INLINE_VSYSCALL (gettimeofday, 2, tv, tz); + if (tz) + memset (tz, 0, sizeof (struct timezone)); + return INLINE_VSYSCALL (gettimeofday, 2, tv, (void *)0); } /* PREPARE_VERSION_KNOWN will need an __LP64__ ifdef when ILP32 support @@ -61,7 +63,9 @@ __hidden_ver1 (__gettimeofday_vsyscall, __GI___gettimeofday, int __gettimeofday (struct timeval *tv, struct timezone *tz) { - return INLINE_SYSCALL (gettimeofday, 2, tv, tz); + if (tz) + memset (tz, 0, sizeof (struct timezone)); + return INLINE_SYSCALL (gettimeofday, 2, tv, (void *)0); } libc_hidden_def (__gettimeofday) |