diff options
author | Zack Weinberg <zackw@panix.com> | 2019-08-19 13:51:25 -0400 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-10-30 17:11:10 -0300 |
commit | 2f2c76e1c8d8c4431c6395afeee420b71a4d772a (patch) | |
tree | 6888887c7a717121658d4c99ffb9390ba519b008 /sysdeps/unix/sysv | |
parent | 5e46749c64d51f50f8511ed99c1266d7c13e182b (diff) | |
download | glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.tar.gz glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.tar.xz glibc-2f2c76e1c8d8c4431c6395afeee420b71a4d772a.zip |
Make second argument of gettimeofday as 'void *'
Also make the public prototype of gettimeofday declare its second argument with type "void *" unconditionally, consistent with POSIX. It is also consistent with POSIX. Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/gettimeofday.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/gettimeofday.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/gettimeofday.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c b/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c index 075af3d0d3..7e772e05ce 100644 --- a/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c @@ -31,7 +31,7 @@ /* Used as a fallback in the ifunc resolver if VDSO is not available and for libc.so internal __gettimeofday calls. */ static int -__gettimeofday_vsyscall (struct timeval *tv, struct timezone *tz) +__gettimeofday_vsyscall (struct timeval *restrict tv, void *restrict tz) { if (__glibc_unlikely (tz != 0)) memset (tz, 0, sizeof *tz); @@ -50,7 +50,7 @@ libc_ifunc (__gettimeofday, #else int -__gettimeofday (struct timeval *tv, struct timezone *tz) +__gettimeofday (struct timeval *restrict tv, void *restrict tz) { return __gettimeofday_vsyscall (tv, tz); } diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c index 02486dee3a..18d8f7cb7a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c @@ -24,7 +24,7 @@ #include <sysdep-vdso.h> static int -__gettimeofday_syscall (struct timeval *tv, struct timezone *tz) +__gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz) { if (__glibc_unlikely (tz != 0)) memset (tz, 0, sizeof *tz); @@ -46,7 +46,7 @@ libc_ifunc (__gettimeofday, : (void *) __gettimeofday_syscall); #else int -__gettimeofday (struct timeval *tv, struct timezone *tz) +__gettimeofday (struct timeval *restrict tv, void *restrict tz) { return __gettimeofday_syscall (tv, tz); } diff --git a/sysdeps/unix/sysv/linux/x86/gettimeofday.c b/sysdeps/unix/sysv/linux/x86/gettimeofday.c index cb20e358d8..190127d31e 100644 --- a/sysdeps/unix/sysv/linux/x86/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/x86/gettimeofday.c @@ -25,7 +25,7 @@ #include <sysdep-vdso.h> static int -__gettimeofday_syscall (struct timeval *tv, struct timezone *tz) +__gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz) { if (__glibc_unlikely (tz != 0)) memset (tz, 0, sizeof *tz); @@ -45,7 +45,7 @@ libc_ifunc (__gettimeofday, #else int -__gettimeofday (struct timeval *tv, struct timezone *tz) +__gettimeofday (struct timeval *restrict tv, void *restrict tz) { return __gettimeofday_syscall (tv, tz); } |