[ntp:bugs] [Bug 1861] Compilation error on tickadj.c
bugzilla-daemon at ntp.org
bugzilla-daemon at ntp.org
Fri Mar 25 08:31:17 UTC 2011
http://bugs.ntp.org/show_bug.cgi?id=1861
--- Comment #12 from Stefan olsson <misca at hotmail.com> 2011-03-25 08:31:17 UTC ---
Hi
Here is a solution to the compilation problem, I am not sure if you
accept it or if it is a bad one.
The idea behind the solution is to to check for the platform call
adjtimex as well, in parallel with the check for __adjtimex.
The build system will favouring __adjtimex before adjtimex.
Essential ./configure will add the #define HAVE_ADJTIMEX 1 to config.h
if it found the system call adjtimex in the same way when ./configure add
#define HAVE___ADJTIMEX 1 to config.h if it find __adjtimex
------
#### File configure.ac, at line 681 insert the following
case "$host" in
*-*-*linux*)
AC_CHECK_FUNCS([adjtimex ntp_gettime])
;;
esac
#### File .../util/tickadj.c line 24, replace #ifdef HAVE___ADJTIMEX with
#if defined (HAVE___ADJTIMEX) || defined (HAVE_ADJTIMEX) /* Linux */
#### File .../util/tickadj.c line 94 and 149, replace if (__adjtimex(&txc) < 0)
with
#ifdef HAVE___ADJTIMEX
if (__adjtimex(&txc) < 0)
#else
if (adjtimex(&txc) < 0)
#endif
----
This solves the compilation error on my platform and make tickadj work.
# tickadj
tick = 9960
# tickadj 9900
tick = 9900
# tickadj 9960
tick = 9960
/Stefan
--
Configure bugmail: http://bugs.ntp.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the bugs
mailing list