blob: cca8c6c36460ab2fa5468d417df64a9e038548e6 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 14 Jun 2018 20:11:08 -0700
4Subject: [PATCH] Replace ntp_adjtime with adjtimex.
5
6ntp_adjtime in glibc is an alias to adjtimex and
7musl does not provide ntp_adjtime at all
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 htpdate.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/htpdate.c b/htpdate.c
17index 4171efe..ff0bf8d 100644
18--- a/htpdate.c
19+++ b/htpdate.c
20@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) {
21
22 /* Read current kernel frequency */
23 tmx.modes = 0;
24- ntp_adjtime(&tmx);
25+ adjtimex(&tmx);
26
27 /* Calculate new frequency */
28 freq = (long)(65536e6 * drift);
29@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) {
30
31 /* Become root */
32 swuid(0);
33- return( ntp_adjtime(&tmx) );
34+ return( adjtimex(&tmx) );
35
36 }
37
38--
392.17.1
40