Patch for NTP cross build errors with new glibc.

View: New views
1 Messages — Rating Filter:   Alert me  

Patch for NTP cross build errors with new glibc.

by Jan Rovins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ever since updating to the latest glibc from the T2 trunk, both my Mips
and x86 cross builds  were failing  at ntp:

-------------------------------------
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[3]: *** [ntp_loopfilter.o] Error 1
make[3]: *** Waiting for unfinished jobs....
----------------------------------------

The following patch fixed it:
----------------------------
diff -ur ntp-4.2.4p7/ntpd/ntp_loopfilter.c
ntp-4.2.4p7.fixed/ntpd/ntp_loopfilter.c
--- ntp-4.2.4p7/ntpd/ntp_loopfilter.c   2007-02-24 06:02:05.000000000 -0500
+++ ntp-4.2.4p7.fixed/ntpd/ntp_loopfilter.c     2009-08-12
13:05:30.418824309 -0400
@@ -567,7 +567,7 @@
                        struct tm *tm = NULL;
                        time_t tstamp;

-#ifdef STA_NANO
+#ifdef MOD_NANO
                        ntv.modes = MOD_BITS | MOD_NANO;
 #else /* STA_NANO */
                        ntv.modes = MOD_BITS;
@@ -892,7 +892,7 @@

                pll_control = 1;
                memset(&ntv, 0, sizeof(ntv));
-#ifdef STA_NANO
+#ifdef MOD_NANO
                ntv.modes = MOD_BITS | MOD_NANO;
 #else /* STA_NANO */
                ntv.modes = MOD_BITS;
-----------------------------------------------

Patchfile is attached.


Jan

diff -ur ntp-4.2.4p7/ntpd/ntp_loopfilter.c ntp-4.2.4p7.fixed/ntpd/ntp_loopfilter.c
--- ntp-4.2.4p7/ntpd/ntp_loopfilter.c 2007-02-24 06:02:05.000000000 -0500
+++ ntp-4.2.4p7.fixed/ntpd/ntp_loopfilter.c 2009-08-12 13:05:30.418824309 -0400
@@ -567,7 +567,7 @@
  struct tm *tm = NULL;
  time_t tstamp;
 
-#ifdef STA_NANO
+#ifdef MOD_NANO
  ntv.modes = MOD_BITS | MOD_NANO;
 #else /* STA_NANO */
  ntv.modes = MOD_BITS;
@@ -892,7 +892,7 @@
 
  pll_control = 1;
  memset(&ntv, 0, sizeof(ntv));
-#ifdef STA_NANO
+#ifdef MOD_NANO
  ntv.modes = MOD_BITS | MOD_NANO;
 #else /* STA_NANO */
  ntv.modes = MOD_BITS;

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
lists@... with a subject of: unsubscribe t2