mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
linux: Fix clock_getres fallback
The tst-timespec_getres (e5ac7bd679
) triggers an issue on 32-bit
architecture on Linux older than 5.1, where the fallback syscall
is used.
Checked on powerpc-linux-gnu.
This commit is contained in:
parent
8382f4c3e5
commit
3f500e7202
@ -56,7 +56,7 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
|
||||
# else
|
||||
r = INLINE_SYSCALL_CALL (clock_getres, clock_id, &ts32);
|
||||
# endif
|
||||
if (r == 0)
|
||||
if (r == 0 && res != NULL)
|
||||
*res = valid_timespec_to_timespec64 (ts32);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user