Hi, Without the attached patch, ntpd from ntp-4.2.4p5 failed to sync with the Linux kernel because it wants to use __adjtimex (not adjtimex). Note that the configure's AC_CHECK_FUNCS() goes to some length to verify that __adjtimex is available as a function, just defining a macro of that name doesn't do the trick.
After applying the patch and rebuilding uClibc and ntpd, it works as expected. Testcase: $ killall ntpd $ date 010101011970 $ hwclock -wu $ ntpd -g $ adjtimex $ sleep 900 $ hwclock -ru The adjtimex command should print "status: 1 (PLL)" and "clock synchronized" if all is working correctly and hwclock should return the proper time & date (the kernel need to be built with option GENERIC_CMOS_UPDATE enabled for hwclock to return the correct time). --david -- Mosberger Consulting LLC, http://www.mosberger-consulting.com/
--- ./toolchain_build_arm/uClibc-0.9.30/libc/sysdeps/linux/common/adjtimex.c~ 2008-10-22 07:36:10.000000000 -0600 +++ ./toolchain_build_arm/uClibc-0.9.30/libc/sysdeps/linux/common/adjtimex.c 2009-01-28 13:10:36.000000000 -0700 @@ -14,6 +14,7 @@ _syscall1(int, adjtimex, struct timex *, buf) libc_hidden_def(adjtimex) +strong_alias(adjtimex,__adjtimex) #if defined __UCLIBC_NTP_LEGACY__ strong_alias(adjtimex,ntp_adjtime) #endif
_______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
