uClibc-ng provides adjtimex() function only, but some programs(like ntpd) requires it's alias - __adjtimex(). There were two methods to implement it:
1) OpenWRT way - just a simple #define
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/120-...
2) glibc way - do it via strong alias
Should we implement __adjtimex() in uClibc-ng? Which way is acceptable for mainstream?
Regards, Leonid
Hi Leonid, Leonid Lisovskiy wrote,
uClibc-ng provides adjtimex() function only, but some programs(like ntpd) requires it's alias - __adjtimex(). There were two methods to implement it:
- OpenWRT way - just a simple #define
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/120-...
- glibc way - do it via strong alias
Should we implement __adjtimex() in uClibc-ng? Which way is acceptable for mainstream?
So you got no other opinions, would you like to cook up a patch integrating it with a strong alias like glibc?
best regards Waldemar
On Sun, Jan 17, 2016 at 5:52 PM, Waldemar Brodkorb wbx@uclibc-ng.org wrote:
So you got no other opinions, would you like to cook up a patch integrating it with a strong alias like glibc?
Ok, I'll do.
regards, Leonid
Althought recent versions of sofware don't require it, old ntpd wants - see http://bugs.ntp.org/show_bug.cgi?id=769
Signed-off-by: Leonid Lisovskiy lly.dev@gmail.com --- include/sys/timex.h | 2 -- libc/sysdeps/linux/common/adjtimex.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/sys/timex.h b/include/sys/timex.h index 57059bd..4cb81d2 100644 --- a/include/sys/timex.h +++ b/include/sys/timex.h @@ -120,9 +120,7 @@ struct timex
__BEGIN_DECLS
-#if 0 extern int __adjtimex (struct timex *__ntx) __THROW; -#endif extern int adjtimex (struct timex *__ntx) __THROW; libc_hidden_proto(adjtimex)
diff --git a/libc/sysdeps/linux/common/adjtimex.c b/libc/sysdeps/linux/common/adjtimex.c index 45cb384..1996502 100644 --- a/libc/sysdeps/linux/common/adjtimex.c +++ b/libc/sysdeps/linux/common/adjtimex.c @@ -13,6 +13,7 @@
_syscall1(int, adjtimex, struct timex *, buf) libc_hidden_def(adjtimex) +weak_alias(adjtimex,__adjtimex) #if defined __UCLIBC_NTP_LEGACY__ strong_alias(adjtimex,ntp_adjtime) #endif
Hi Leonid, Leonid Lisovskiy wrote,
Althought recent versions of sofware don't require it, old ntpd wants - see http://bugs.ntp.org/show_bug.cgi?id=769
Signed-off-by: Leonid Lisovskiy lly.dev@gmail.com
Applied and integrated in latest release, best regards Waldemar