[Git][NTPsec/ntpsec][master] Add runtime warning about time_t being 32 bits.

Gary E. Miller gitlab at mg.gitlab.com
Wed Apr 19 20:04:42 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
cf42ab59 by Gary E. Miller at 2017-04-19T13:04:00-07:00
Add runtime warning about time_t being 32 bits.

It seems Gentoo and Raspbian on RasPi have 32-bit time_t.

- - - - -


1 changed file:

- ntpd/ntpd.c


Changes:

=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -897,6 +897,11 @@ ntpdmain(
 	readconfig(getconfig(explicit_config));
 	check_minsane();
 
+        if ( 8 > sizeof(time_t) ) {
+	    msyslog(LOG_ERR, "This system has a 32-bit time_t.");
+	    msyslog(LOG_ERR, "This ntpd will fail on 2038-01-19T03:14:07Z.");
+        }
+
 	loop_config(LOOP_DRIFTINIT, 0);
 	/* report_event(EVNT_SYSRESTART, NULL, NULL); */
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cf42ab599dc6d622619a76439ad759e4b9c4b8c3

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cf42ab599dc6d622619a76439ad759e4b9c4b8c3
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170419/52bf7f6d/attachment.html>


More information about the vc mailing list