fix broken time64 clock_adjtime
authorRich Felker <dalias@aerifal.cx>
Wed, 3 Jun 2020 00:07:39 +0000 (20:07 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 3 Jun 2020 00:07:39 +0000 (20:07 -0400)
the 64-bit time code path used the wrong (time32) syscall. fortunately
this code path is not yet taken unless attempting to set a post-Y2038
time.

src/linux/clock_adjtime.c

index 23eb8729db0638aa680bcc840adc48ece77949dc..52d3e0c434a56f6bae6bf3c32f8aba7714105006 100644 (file)
@@ -63,7 +63,7 @@ int clock_adjtime (clockid_t clock_id, struct timex *utx)
                        .stbcnt = utx->stbcnt,
                        .tai = utx->tai,
                };
                        .stbcnt = utx->stbcnt,
                        .tai = utx->tai,
                };
-               r = __syscall(SYS_clock_adjtime, clock_id, &ktx);
+               r = __syscall(SYS_clock_adjtime64, clock_id, &ktx);
                if (r>=0) {
                        utx->modes = ktx.modes;
                        utx->offset = ktx.offset;
                if (r>=0) {
                        utx->modes = ktx.modes;
                        utx->offset = ktx.offset;