[oe-commits] Petr Štetiar : ntpclient: fix adjtimex compile error on uclibc

git version control git at git.openembedded.org
Mon Oct 4 20:07:06 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: b0bcd6021f3f03a089220ac68fc9156dec894aa1
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b0bcd6021f3f03a089220ac68fc9156dec894aa1

Author: Petr Štetiar <ynezz at true.cz>
Date:   Sun Oct  3 02:14:34 2010 +0000

ntpclient: fix adjtimex compile error on uclibc

ntpclient.o: In function `set_freq':
ntpclient-2007_365-r3/ntpclient-2007/ntpclient.c:166: undefined reference to `__adj timex'
ntpclient.o: In function `get_current_freq':
ntpclient-2007_365-r3/ntpclient-2007/ntpclient.c:149: undefined reference to `__adj timex'

Signed-off-by: Petr Štetiar <ynezz at true.cz>
Signed-off-by: Eric Bénard <eric at eukrea.com>

---

 recipes/ntpclient/files/fix-adjtimex-uclibc.patch |   22 +++++++++++++++++++++
 recipes/ntpclient/ntpclient_2007_365.bb           |   10 +++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/recipes/ntpclient/files/fix-adjtimex-uclibc.patch b/recipes/ntpclient/files/fix-adjtimex-uclibc.patch
new file mode 100644
index 0000000..49472c9
--- /dev/null
+++ b/recipes/ntpclient/files/fix-adjtimex-uclibc.patch
@@ -0,0 +1,22 @@
+Index: ntpclient-2007/ntpclient.c
+===================================================================
+--- ntpclient-2007.orig/ntpclient.c	2010-10-01 17:25:20.000000000 +0200
++++ ntpclient-2007/ntpclient.c	2010-10-01 17:25:38.000000000 +0200
+@@ -146,7 +146,7 @@
+ #ifdef __linux__
+ 	struct timex txc;
+ 	txc.modes=0;
+-	if (__adjtimex(&txc) < 0) {
++	if (adjtimex(&txc) < 0) {
+ 		perror("adjtimex"); exit(1);
+ 	}
+ 	return txc.freq;
+@@ -163,7 +163,7 @@
+ 	struct timex txc;
+ 	txc.modes = ADJ_FREQUENCY;
+ 	txc.freq = new_freq;
+-	if (__adjtimex(&txc) < 0) {
++	if (adjtimex(&txc) < 0) {
+ 		perror("adjtimex"); exit(1);
+ 	}
+ 	return txc.freq;
diff --git a/recipes/ntpclient/ntpclient_2007_365.bb b/recipes/ntpclient/ntpclient_2007_365.bb
index 40a4e1b..9d38245 100644
--- a/recipes/ntpclient/ntpclient_2007_365.bb
+++ b/recipes/ntpclient/ntpclient_2007_365.bb
@@ -4,14 +4,20 @@ AUTHOR = "Larry Doolittle <larry at doolittle.boa.org>"
 RDEPENDS_${PN} = "busybox"
 SECTION = "admin"
 LICENSE = "GPLv2"
-PR = "r3"
+PR = "r4"
 # The ntpclient package uses version numbers that include an underscore :(
 PV = "2007_365"
 # ntpclient unpacks into a directory that doesn't include version info :(
 S = "${WORKDIR}/${PN}-2007"
 
 SRC_URI = "http://doolittle.icarus.com/ntpclient/ntpclient_${PV}.tar.gz \
-           file://init"
+           file://init \
+          "
+
+UCLIBC_PATCHES = " file://fix-adjtimex-uclibc.patch \
+                 "
+SRC_URI_append_linux-uclibc = ${UCLIBC_PATCHES}
+SRC_URI_append_linux-uclibceabi = ${UCLIBC_PATCHES}
 
 INITSCRIPT_NAME = "ntpclient"
 INITSCRIPT_PARAMS = "defaults 65"





More information about the Openembedded-commits mailing list