summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-07 14:46:07 +0000
committerbde <bde@FreeBSD.org>1995-12-07 14:46:07 +0000
commit0f15d0a9c376eebed8d856a37624d57c5371e652 (patch)
tree106dcaf4b177475f0dac510df7fd401661f6a8c6 /usr.sbin/xntpd
parentcfa8b15392dfa0d9beabf59528a65ec3183cce39 (diff)
downloadFreeBSD-src-0f15d0a9c376eebed8d856a37624d57c5371e652.zip
FreeBSD-src-0f15d0a9c376eebed8d856a37624d57c5371e652.tar.gz
Moved a test for HAVE_GETBOOTFILE to after the #include of the
configuration header that may define it. Fixed the resulting warnings.
Diffstat (limited to 'usr.sbin/xntpd')
-rw-r--r--usr.sbin/xntpd/util/tickadj.c11
1 files changed, 6 insertions, 5 deletions
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 <unistd.h>
#endif /* SYS_VAX */
-#if defined(HAVE_GETBOOTFILE)
-#include <paths.h>
-#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 <paths.h>
+#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
OpenPOWER on IntegriCloud