From 0f15d0a9c376eebed8d856a37624d57c5371e652 Mon Sep 17 00:00:00 2001 From: bde Date: Thu, 7 Dec 1995 14:46:07 +0000 Subject: Moved a test for HAVE_GETBOOTFILE to after the #include of the configuration header that may define it. Fixed the resulting warnings. --- usr.sbin/xntpd/util/tickadj.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'usr.sbin/xntpd') diff --git a/usr.sbin/xntpd/util/tickadj.c b/usr.sbin/xntpd/util/tickadj.c index 74757dd..3a70b4f 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 -- cgit v1.1