diff --git a/usr.sbin/xntpd/util/tickadj.c b/usr.sbin/xntpd/util/tickadj.c index 74757dd95dc4..3a70b4f70204 100644 --- a/usr.sbin/xntpd/util/tickadj.c +++ b/usr.sbin/xntpd/util/tickadj.c @@ -11,10 +11,6 @@ #include #endif /* SYS_VAX */ -#if defined(HAVE_GETBOOTFILE) -#include -#endif - #ifdef SYS_LINUX #include "sys/timex.h" @@ -69,6 +65,10 @@ main(int argc, char ** argv) #include "ntp_io.h" #include "ntp_stdlib.h" +#if defined(HAVE_GETBOOTFILE) +#include +#endif + #ifdef RS6000 #undef hz #endif /* RS6000 */ @@ -445,7 +445,8 @@ getoffsets(filex, tick_off, tickadj_off, dosync_off, noprintf_off) struct stat stbuf; #ifdef HAVE_GETBOOTFILE - *kname = getbootfile(); + /* XXX bogus cast to avoid `const' poisoning. */ + *kname = (char *)getbootfile(); if (stat(*kname, &stbuf) == -1 || nlist(*kname, nl) == -1) *kname = NULL; #else