[Git][NTPsec/ntpsec][master] Drop support for OS X 10.11. Apple screwed this pooch too many different ways.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Aug 12 18:37:57 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
cc9491c8 by Eric S. Raymond at 2017-08-12T14:34:06-04:00
Drop support for OS X 10.11.  Apple screwed this pooch too many different ways.

Last straw was the ahipped headers in some versions not matching what's on
the Apple website (Report from Leonardo Bruni Schenkel.)

We also have intelligence that the clock_setting shim in some builds
of 10.11 is broken.

10.12 has clock_gettime(2) and clock_settime(2); it should be OK.

- - - - -


2 changed files:

- INSTALL
- libntp/clockwork.c


Changes:

=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -99,9 +99,13 @@ wget:
 
 === Apple ===
 
+Previous support for OS X 10.11 has been dropped due to multiple
+botches on Apple's part.  Your OS X needs to have POSIX compliant
+clock_gettime(2) and clock_settime(2) functions.
+
 The OS X build has been tested in this environment:
 
- OS X Version             : 10.11.x (El Capitan)
+ OS X Version             : 10.12
  Xcode Version            : 7.1
  Xcode Command Line Tools : 7.2-beta
 


=====================================
libntp/clockwork.c
=====================================
--- a/libntp/clockwork.c
+++ b/libntp/clockwork.c
@@ -19,44 +19,6 @@
 #include "ntp_debug.h"
 #include "ntp_syscall.h"
 
-/*
- * Simulate ANSI/POSIX conformance on platforms that don't have it
- */
-#ifndef HAVE_CLOCK_GETTIME
-#ifdef __MACH__
-#include <mach/clock.h>
-#include <mach/mach.h>
-#endif
-
-int clock_gettime(clockid_t clk_id, struct timespec *tp)
-{
-#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
-    clock_serv_t cclock;
-    mach_timespec_t mts;
-    int mode;
-    switch (clk_id) {
-    case CLOCK_REALTIME:
-	mode = CALENDAR_CLOCK;
-	break;
-    case CLOCK_MONOTONIC:
-	/* http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx */
-	mode = SYSTEM_CLOCK;
-	break;
-    default:
-	return -1;
-    }
-    host_get_clock_service(mach_host_self(), mode, &cclock);
-    clock_get_time(cclock, &mts);
-    mach_port_deallocate(mach_task_self(), cclock);
-    tp->tv_sec = mts.tv_sec;
-    tp->tv_nsec = mts.tv_nsec;
-#else
-#error POSIX clock_gettime(2) is required
-#endif
-    return 0;
-}
-#endif /* HAVE_CLOCK_GETTIME */
-
 #ifdef HAVE_SYS_TIMEX_H
 /*
  * ntp_adjtime at nanosecond precision.  Hiding the units difference



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cc9491c82a7f411f1c610e5b1edc76abcaddd512
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/20170812/c2490efe/attachment.html>


More information about the vc mailing list