| [chrony-dev] [PATCH] Remove clock_gettime() override function from macOS driver |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH] Remove clock_gettime() override function from macOS driver
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Wed, 28 Jan 2026 20:35:44 +1300
- Cc: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=m37lf0.a1-4.dyn; x=1769586732; h=Feedback-ID: X-Smtpcorp-Track:Message-ID:Date:Subject:To:From:Reply-To:Sender: List-Unsubscribe:List-Unsubscribe-Post; bh=suu/H6Kf7NtqKTbd9Q/SjnJRhth0v9W9hOcp8r5e3Lk=; b=ir8wZbtYBdBSCHE+evTZS7sn3l AdeKJdSvQDRljUv7lnWs27yntWwHYtg+Nbyt/S+F/PxbFD0SF5A7iHMBcQCfEV6TBjtvPLtMop4mq iWqS8sOCGupocF8uG7YJ5+DizWsaoZ1UOpFJcdvRukq5+1MRl125kEnY74puac/nbQjl4RfzU+9Gz xM0cuPjY4PmwTO1E1TG3ffmkaERsJkrFOe+SP2fHuqBrwOXKivdbaadwIGVWZZbUZ3NE5SjkLNQBa hrMwfbOZu3iC70CIpU7LPBvHDk6yYS08fP77WSeHWkiHqIiiPwmch29ldbiDjdcbt6BE3387wkGI9 Vl0kihxA==;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whatroute.net; i=@whatroute.net; q=dns/txt; s=s149811; t=1769585832; h=from : subject : to : message-id : date; bh=suu/H6Kf7NtqKTbd9Q/SjnJRhth0v9W9hOcp8r5e3Lk=; b=OSFX0YSAcOYl7MLTtRWJFTHM41LcxLRmijbRzNwd+5KQvNekcr86KFAM8RaH8tpgjgZje KCev+dDzAkK/2zOiqoB82Uy5QrJDMTUugYVj3Uc3stRPqxEdvb/NQXd2t+mu9/JFKS6+xYv xooMv3YSX96Z2tOeAXOAERp4WG7fsPmpYdYrdgxMiJQ+e40fbzPHxE/m5SvGBdFovz+3/pK swWsvsaBBbEbrWbPWTxeOaKjsDb3kmxuK72iAVurIW0aeuRFlIcJ/qKizjO/HN5Vb+qGB0u P+kBk4Lyj7GSZKZFVGgOKX3JXmsnWEztwGw/IxNoQ9GiPm7F7wnh5VaAmGbg==
- Feedback-id: 149811m:149811acx33YQ:149811swr6-cVpaX
This will also remove a call to gettimeofday() that was used on very early versions of macOS where clock_gettime was not implemented.
---
sys_macosx.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/sys_macosx.c b/sys_macosx.c
index e3a38ed..c668bd4 100644
--- a/sys_macosx.c
+++ b/sys_macosx.c
@@ -453,39 +453,6 @@ legacy_MacOSX_Finalise(void)
/* ================================================== */
-#if HAVE_CLOCK_GETTIME
-int
-clock_gettime(clockid_t clock_id, struct timespec *ts)
-{
- /* Check that the system clock_gettime symbol is actually present before
- attempting to call it. The symbol is available in macOS 10.12
- and later. */
-
- static int init = 0;
- static int (*sys_clock_gettime)(clockid_t, struct timespec *) = NULL;
- int ret = 0;
-
- if (!init) {
- sys_clock_gettime = dlsym(RTLD_NEXT, "clock_gettime");
- init = 1;
- }
-
- if (sys_clock_gettime != NULL) {
- ret = sys_clock_gettime(clock_id, ts);
- } else {
- struct timeval tv;
-
- if (gettimeofday(&tv, NULL) < 0)
- LOG_FATAL("gettimeofday() failed : %s", strerror(errno));
-
- UTI_TimevalToTimespec(&tv, ts);
- }
- return ret;
-}
-#endif
-
-/* ================================================== */
-
void
SYS_MacOSX_Initialise(void)
{
--
2.50.1 (Apple Git-155)
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.