Moved a test for HAVE_GETBOOTFILE to after the #include of the
configuration header that may define it. Fixed the resulting warnings.
This commit is contained in:
parent
df4b6087db
commit
f781e76a9a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user