Signed-off-by: Alexander Stein <[email protected]>
---
 patches/ntp-4.2.4p7/Fix-undefined-MOD_NANO.patch |   50 ++++++++++++++++++++++
 patches/ntp-4.2.4p7/series                       |    1 +
 2 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 patches/ntp-4.2.4p7/Fix-undefined-MOD_NANO.patch
 create mode 100644 patches/ntp-4.2.4p7/series

diff --git a/patches/ntp-4.2.4p7/Fix-undefined-MOD_NANO.patch 
b/patches/ntp-4.2.4p7/Fix-undefined-MOD_NANO.patch
new file mode 100644
index 0000000..5970a89
--- /dev/null
+++ b/patches/ntp-4.2.4p7/Fix-undefined-MOD_NANO.patch
@@ -0,0 +1,50 @@
+From 4ccca7260da74d8f9a238a79c03da440831bd33e Mon Sep 17 00:00:00 2001
+From: Alexander Stein <[email protected]>
+Date: Tue, 5 Jan 2010 13:13:02 +0100
+Subject: [PATCH] Fix undefined MOD_NANO
+
+With gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) I get this error:
+
+ntp_loopfilter.c: In function 'local_clock':
+ntp_loopfilter.c:571: error: 'MOD_NANO' undeclared (first use in this function)
+ntp_loopfilter.c:571: error: (Each undeclared identifier is reported only once
+ntp_loopfilter.c:571: error: for each function it appears in.)
+ntp_loopfilter.c: In function 'loop_config':
+ntp_loopfilter.c:896: error: 'MOD_NANO' undeclared (first use in this function)
+make[4]: *** [ntp_loopfilter.o] Error 1
+
+Fix it by chaning MOD_NANO to STA_NANO.
+
+I got this problem based on the commit
+550818d56b39528fe5d9d134bebd3c4e82661ca6 aka tag ptxdist-1.99.20.
+I just tested ntp-4.2.6 from ptxdist commit
+ee9c22fd9242c80f242007fc759ea85517676a96 and still got the same error, but 
the 
+lines may have shifted.
+
+Signed-off-by: Alexander Stein <[email protected]>
+---
+ ntpd/ntp_loopfilter.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: ntp-4.2.4p7/ntpd/ntp_loopfilter.c
+===================================================================
+--- ntp-4.2.4p7/ntpd/ntp_loopfilter.c
++++ ntp-4.2.4p7/ntpd/ntp_loopfilter.c
+@@ -568,7 +568,7 @@
+                       time_t tstamp;
+ 
+ #ifdef STA_NANO
+-                      ntv.modes = MOD_BITS | MOD_NANO;
++                      ntv.modes = MOD_BITS | STA_NANO;
+ #else /* STA_NANO */
+                       ntv.modes = MOD_BITS;
+ #endif /* STA_NANO */
+@@ -893,7 +893,7 @@
+               pll_control = 1;
+               memset(&ntv, 0, sizeof(ntv));
+ #ifdef STA_NANO
+-              ntv.modes = MOD_BITS | MOD_NANO;
++              ntv.modes = MOD_BITS | STA_NANO;
+ #else /* STA_NANO */
+               ntv.modes = MOD_BITS;
+ #endif /* STA_NANO */
diff --git a/patches/ntp-4.2.4p7/series b/patches/ntp-4.2.4p7/series
new file mode 100644
index 0000000..6a7679c
--- /dev/null
+++ b/patches/ntp-4.2.4p7/series
@@ -0,0 +1 @@
+Fix-undefined-MOD_NANO.patch
-- 
1.6.4.4

--
ptxdist mailing list
[email protected]

Reply via email to