[Git][NTPsec/ntpsec][master] Address Gitlab issue #422: Build warnings for implicit declaration of function

Eric S. Raymond gitlab at mg.gitlab.com
Sun Dec 3 21:38:08 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
5fa4e658 by Eric S. Raymond at 2017-12-03T16:37:55-05:00
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.

- - - - -


3 changed files:

- include/ntp_syscall.h
- libntp/clockwork.c
- wscript


Changes:

=====================================
include/ntp_syscall.h
=====================================
--- a/include/ntp_syscall.h
+++ b/include/ntp_syscall.h
@@ -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)


=====================================
libntp/clockwork.c
=====================================
--- a/libntp/clockwork.c
+++ b/libntp/clockwork.c
@@ -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"


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -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



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5fa4e658ef4903b9722dc309f8866aaf727bf6c8

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5fa4e658ef4903b9722dc309f8866aaf727bf6c8
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171203/edde0be1/attachment.html>


More information about the vc mailing list