ntp: bump to version 4.2.6p3 and fix glibc build failure
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Thu, 27 Jan 2011 16:24:10 +0000 (13:24 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 29 Jan 2011 23:40:13 +0000 (00:40 +0100)
Bump to version 4.2.6p3 and fix a build failure with external toolchains
that use certain glibc versions as point out by speakman on IRC.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Daniel Nyström <daniel.nystrom@timeterminal.se>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/ntp/ntp-4.2.6_p2-adjtimex.patch [deleted file]
package/ntp/ntp-adjtimex.patch [new file with mode: 0644]
package/ntp/ntp-nano.patch [new file with mode: 0644]
package/ntp/ntp.mk

diff --git a/package/ntp/ntp-4.2.6_p2-adjtimex.patch b/package/ntp/ntp-4.2.6_p2-adjtimex.patch
deleted file mode 100644 (file)
index 40625fa..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-https://support.ntp.org/bugs/show_bug.cgi?id=769
-http://bugs.gentoo.org/254030
-
---- ntp/util/tickadj.c
-+++ ntp/util/tickadj.c
-@@ -21,7 +21,8 @@
- # include <unistd.h>
- #endif /* HAVE_UNISTD_H */
--#ifdef HAVE___ADJTIMEX                /* Linux */
-+/* proper handling here has been moved to upstream ntp bugzilla */
-+#ifdef linux
- #include <sys/timex.h>
- struct timex txc;
-@@ -91,7 +92,7 @@
-       }
-       if (!errflg) {
--              if (__adjtimex(&txc) < 0)
-+              if (adjtimex(&txc) < 0)
-                       perror("adjtimex");
-               else if (!quiet)
-                       printf("tick     = %ld\ntick_adj = %d\n",
-@@ -146,7 +147,7 @@
- #endif
-       }
-     
--      if (__adjtimex(&txc) < 0)
-+      if (adjtimex(&txc) < 0)
-       {
-               perror("adjtimex");
-       }
diff --git a/package/ntp/ntp-adjtimex.patch b/package/ntp/ntp-adjtimex.patch
new file mode 100644 (file)
index 0000000..40625fa
--- /dev/null
@@ -0,0 +1,33 @@
+https://support.ntp.org/bugs/show_bug.cgi?id=769
+http://bugs.gentoo.org/254030
+
+--- ntp/util/tickadj.c
++++ ntp/util/tickadj.c
+@@ -21,7 +21,8 @@
+ # include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+-#ifdef HAVE___ADJTIMEX                /* Linux */
++/* proper handling here has been moved to upstream ntp bugzilla */
++#ifdef linux
+ #include <sys/timex.h>
+ struct timex txc;
+@@ -91,7 +92,7 @@
+       }
+       if (!errflg) {
+-              if (__adjtimex(&txc) < 0)
++              if (adjtimex(&txc) < 0)
+                       perror("adjtimex");
+               else if (!quiet)
+                       printf("tick     = %ld\ntick_adj = %d\n",
+@@ -146,7 +147,7 @@
+ #endif
+       }
+     
+-      if (__adjtimex(&txc) < 0)
++      if (adjtimex(&txc) < 0)
+       {
+               perror("adjtimex");
+       }
diff --git a/package/ntp/ntp-nano.patch b/package/ntp/ntp-nano.patch
new file mode 100644 (file)
index 0000000..d16046c
--- /dev/null
@@ -0,0 +1,23 @@
+Fixes issues with glibc header files, see
+http://bugs.gentoo.org/show_bug.cgi?id=270483
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura ntp-4.2.6p2.orig/include/ntp_syscall.h ntp-4.2.6p2/include/ntp_syscall.h
+--- ntp-4.2.6p2.orig/include/ntp_syscall.h     2009-12-09 04:36:37.000000000 -0300
++++ ntp-4.2.6p2/include/ntp_syscall.h  2011-01-27 13:09:05.072336628 -0300
+@@ -14,6 +14,14 @@
+ # include <sys/timex.h>
+ #endif
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t)               syscall(SYS_ntp_adjtime, (t))
index 51e395620019ee63382a40404d1ce2e07652a07e..7e09b5eddc19924a874221295cdef163633f2251 100644 (file)
@@ -3,7 +3,7 @@
 # ntp
 #
 #############################################################
-NTP_VERSION = 4.2.6p2
+NTP_VERSION = 4.2.6p3
 NTP_SOURCE = ntp-$(NTP_VERSION).tar.gz
 NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2