[Git][NTPsec/ntpsec][master] Port fix for glibc versions < 2.12.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Dec 10 01:18:46 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
f105623e by Eric S. Raymond at 2016-12-09T20:17:53-05:00
Port fix for glibc versions < 2.12.
- - - - -
2 changed files:
- ntptime/ntptime.c
- wafhelpers/configure.py
Changes:
=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -353,12 +353,13 @@ main(
(u_int)ts.l_ui, (u_int)ts.l_uf,
(int)ntv.time.tv_sec, fdigits,
(int)time_frac,
+
ctime_r((time_t *)&ntv.time.tv_sec, ascbuf));
-#if NTP_API > 3
+#if defined(STRUCT_NTPTIMEVAL_HAS_TAI) && NTP_API > 3
printf(json ? jfmt5 : ofmt5, (long)ntv.tai);
#else
printf(json ? jfmt6 : ofmt6);
-#endif /* NTP_API */
+#endif /* defined(STRUCT_NTPTIMEVAL_HAS_TAI) && NTP_API */
}
status = ntp_adjtime_ns(&ntx);
if (status < 0) {
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -259,7 +259,7 @@ def cmd_configure(ctx, config):
("time_tick", "timex", ["sys/time.h", "sys/timex.h"]),
("modes", "timex", ["sys/time.h", "sys/timex.h"]),
("time.tv_nsec", "ntptimeval", ["sys/time.h", "sys/timex.h"]),
- ("tai", "ntptimeval", ["sys/time.h", "sys/timex.h"]),
+ ("tai", "ntptimeval", ["sys/time.h", "sys/timex.h"]), # first in glibc 2.12
)
for (f, s, h) in structure_fields:
check_structfield(ctx, f, s, h)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f105623eab3da44008c78d5e6e9ecb5eccc00c90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161210/d043359e/attachment.html>
More information about the vc
mailing list