From cd79e9288576d5cf46455171d9b1b3374e90cd6d Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 10 Apr 2020 22:22:14 -0700 Subject: [PATCH] ntpclient: fixup time patch Added missing header and added casts. Signed-off-by: Rosen Penev --- net/ntpclient/Makefile | 2 +- net/ntpclient/patches/200-time.patch | 19 ++++++++++++++++--- net/ntpclient/patches/300-siocgarp.patch | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/net/ntpclient/Makefile b/net/ntpclient/Makefile index 406bd6b3a..ffe9e8841 100644 --- a/net/ntpclient/Makefile +++ b/net/ntpclient/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ntpclient PKG_VERSION:=2015_365 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient diff --git a/net/ntpclient/patches/200-time.patch b/net/ntpclient/patches/200-time.patch index d1d7c9e8f..6456f3093 100644 --- a/net/ntpclient/patches/200-time.patch +++ b/net/ntpclient/patches/200-time.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -143,8 +144,8 @@ int main(int argc, char ** argv) +@@ -143,12 +144,12 @@ int main(int argc, char ** argv) " precision: %ld\n" " tolerance: %ld\n" "-t tick: %ld\n" @@ -19,9 +19,22 @@ " return value: %d (%s)\n", txc.constant, txc.precision, txc.tolerance, txc.tick, +- txc.time.tv_sec, txc.time.tv_usec, ret, ++ (int64_t)txc.time.tv_sec, (int64_t)txc.time.tv_usec, ret, + (ret >= 0 && ret <= 5) ? ret_code_descript[ret] : "error" ); + } + return (ret<0); --- a/ntpclient.c +++ b/ntpclient.c -@@ -181,7 +181,7 @@ static void set_time(struct ntptime *new) +@@ -29,6 +29,7 @@ + * labelled "XXX fixme - non-automatic build configuration". + */ + ++#include + #include + #include + #include +@@ -181,7 +182,7 @@ static void set_time(struct ntptime *new) exit(1); } if (debug) { @@ -30,7 +43,7 @@ } #else /* Traditional Linux way to set the system clock -@@ -196,7 +196,7 @@ static void set_time(struct ntptime *new) +@@ -196,7 +197,7 @@ static void set_time(struct ntptime *new) exit(1); } if (debug) { diff --git a/net/ntpclient/patches/300-siocgarp.patch b/net/ntpclient/patches/300-siocgarp.patch index db4a80c2a..e03c9b93e 100644 --- a/net/ntpclient/patches/300-siocgarp.patch +++ b/net/ntpclient/patches/300-siocgarp.patch @@ -1,6 +1,6 @@ --- a/ntpclient.c +++ b/ntpclient.c -@@ -42,6 +42,9 @@ +@@ -43,6 +43,9 @@ #include #ifdef PRECISION_SIOCGSTAMP #include