Explorar o código

fix regression in clock_gettime on 32-bit archs without vdso

commit 72f50245d018af0c31b38dec83c557a4e5dd1ea8 broke this by creating
a code path where r is uninitialized.
Rich Felker %!s(int64=5) %!d(string=hai) anos
pai
achega
244778f70c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/time/clock_gettime.c

+ 1 - 0
src/time/clock_gettime.c

@@ -73,6 +73,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts)
 #endif
 
 #ifdef SYS_clock_gettime64
+	r = -ENOSYS;
 	if (sizeof(time_t) > 4)
 		r = __syscall(SYS_clock_gettime64, clk, ts);
 	if (SYS_clock_gettime == SYS_clock_gettime64 || r!=-ENOSYS)