[Git][NTPsec/ntpsec][master] ntpfrob: FreeBSD and NetBSD fail to define PPS_API_VERS publicly.

Gary E. Miller gitlab at mg.gitlab.com
Thu May 25 01:22:14 UTC 2017


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


Commits:
5d8ae94f by Gary E. Miller at 2017-05-24T18:19:31-07:00
ntpfrob: FreeBSD and NetBSD fail to define PPS_API_VERS publicly.

Assume version 1.

- - - - -


1 changed file:

- ntpfrob/pps-api.c


Changes:

=====================================
ntpfrob/pps-api.c
=====================================
--- a/ntpfrob/pps-api.c
+++ b/ntpfrob/pps-api.c
@@ -92,11 +92,17 @@ void ppscheck(const char *device)
 	if (i < 0)
 		err(1, "time_pps_getcap");
 
+        memset(&pp, 0, sizeof(pp));
 	/* pp.mode = PPS_CAPTUREASSERT | PPS_ECHOASSERT; */
 	pp.mode = PPS_CAPTUREBOTH;
 	/* pp.mode = PPS_CAPTUREASSERT; */
 
+#ifdef PPS_API_VERS
         pp.api_version = PPS_API_VERS;
+#else
+        /* FreeBSD, NetBSD do not publicly define PPS_ABI_VERS, assume 1 */
+        pp.api_version = 1;
+#endif
 
 	i = time_pps_setparams(ph, &pp);
 	if (i < 0)



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5d8ae94f8cbf224846ea9788b5f9fef8cf7fa7bf
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/20170525/b9ab208a/attachment.html>


More information about the vc mailing list