]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Add missing handling of tai field to __ntp_gettime64
authorFlorian Weimer <fweimer@redhat.com>
Wed, 20 May 2020 15:15:45 +0000 (17:15 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 20 May 2020 15:58:56 +0000 (17:58 +0200)
This fixes a build error:

../sysdeps/unix/sysv/linux/ntp_gettime.c: In function ‘__ntp_gettime’:
../sysdeps/unix/sysv/linux/ntp_gettime.c:56:10: error: ‘ntv64.tai’ is used uninitialized in this function [-Werror=uninitialized]
   56 |   *ntv = valid_ntptimeval64_to_ntptimeval (ntv64);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sysdeps/unix/sysv/linux/ntp_gettime.c

index 8ce5d13e00aeaa451c46a8921011c1f5013373a2..2fdc6feb31fcfa68f8703429c03dbacb3eafc993 100644 (file)
@@ -40,6 +40,7 @@ __ntp_gettime64 (struct __ntptimeval64 *ntv)
   ntv->time = tntx.time;
   ntv->maxerror = tntx.maxerror;
   ntv->esterror = tntx.esterror;
+  ntv->tai = tntx.tai;
   return result;
 }