Commit 5fa4e658 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Address Gitlab issue #422: Build warnings for implicit declaration of function

Note: this commit forms a unit with "Experimental removal of HAVE_KERNEL_PLL."
If either are referted, both should be.
parent a5b59ec6
Pipeline #14675920 passed with stages
in 12 minutes and 24 seconds
......@@ -9,23 +9,11 @@
#ifndef GUARD_NTP_SYSCALL_H
#define GUARD_NTP_SYSCALL_H
#ifdef HAVE_SYS_TIMEX_H
# include <sys/time.h> /* prerequisite on NetBSD */
# include <sys/timex.h>
extern int ntp_adjtime_ns(struct timex *);
#endif
/*
* The units of the maxerror and esterror fields vary by platform. If
* STA_NANO is defined, they're in nanoseconds; otherwise in
* microseconds. Hide the difference by normalizing everything to
* float seconds.
*/
# ifdef STA_NANO
#define ntp_error_in_seconds(n) ((n)/1.0e9)
# else
#define ntp_error_in_seconds(n) ((n)/1.0e6)
# endif
/* MUSL port shim */
#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
......
......@@ -6,10 +6,8 @@
#include "config.h"
#ifdef HAVE_SYS_TIMEX_H
# include <sys/time.h> /* prerequisite on NetBSD */
# include <sys/timex.h>
#endif
#include "ntp.h"
#include "ntp_machine.h"
......
......@@ -567,13 +567,13 @@ int main(int argc, char **argv) {
ctx.define("__EXTENSIONS__", "1", quote=False)
structures = (
("struct if_laddrconf", ["sys/types.h", "net/if6.h"]),
("struct if_laddrreq", ["sys/types.h", "net/if6.h"]),
("struct timex", ["sys/time.h", "sys/timex.h"]),
("struct ntptimeval", ["sys/time.h", "sys/timex.h"]),
("struct if_laddrconf", ["sys/types.h", "net/if6.h"], False),
("struct if_laddrreq", ["sys/types.h", "net/if6.h"], False),
("struct timex", ["sys/time.h", "sys/timex.h"], True),
("struct ntptimeval", ["sys/time.h", "sys/timex.h"], False),
)
for (s, h) in structures:
ctx.check_cc(type_name=s, header_name=h, mandatory=False)
for (s, h, r) in structures:
ctx.check_cc(type_name=s, header_name=h, mandatory=r)
# waf's SNIP_FIELD should likely include this header itself
# This is needed on some systems to get size_t for following checks
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment