Android仿生libc中缺少adjtime()
我试图使用android构建系统为android编译一个ntp客户端,但遇到了一个问题,在仿生libc中似乎缺少adjtime()。如何在不修改bionic的情况下添加对adjtime()的支持Android仿生libc中缺少adjtime(),android,c,linux,android-ndk,Android,C,Linux,Android Ndk,我试图使用android构建系统为android编译一个ntp客户端,但遇到了一个问题,在仿生libc中似乎缺少adjtime()。如何在不修改bionic的情况下添加对adjtime()的支持 我正在编译openntpd以供参考。也许您可以调用系统调用raw /* if it's not already defined, be sure to check this: syscall numbering is different on every architecture */ #defi
我正在编译openntpd以供参考。也许您可以调用系统调用raw
/* if it's not already defined, be sure to check this:
syscall numbering is different on every architecture */
#define SYS_adjtimex 124
int adjtimex(struct timex *txc) {
return syscall1(SYS_adjtimex, (void *)txc);
}
如果需要,请参阅adjtimex
文档,因为它是一个特定于Linux的系统调用,其工作方式与adjtimex
稍有不同