summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/util/tickadj.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/xntpd/util/tickadj.c')
-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