[Git][NTPsec/ntpsec][master] 2 commits: libisc: fix Solaris warning of undefined macro.

Gary E. Miller gitlab at mg.gitlab.com
Wed May 31 23:35:20 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
afeae3ed by Gary E. Miller at 2017-05-31T16:23:04-07:00
libisc: fix Solaris warning of undefined macro.

- - - - -
b2df2592 by Gary E. Miller at 2017-05-31T16:34:09-07:00
ntpd: fix Slowlaris warniings about unused parameters.

- - - - -


2 changed files:

- libisc/interfaceiter.c
- ntpd/ntp_packetstamp.c


Changes:

=====================================
libisc/interfaceiter.c
=====================================
--- a/libisc/interfaceiter.c
+++ b/libisc/interfaceiter.c
@@ -156,7 +156,7 @@ isc_interfaceiter_current_bool(isc_interfaceiter_t *iter,
 
 #if HAVE_IFADDRS_H
 #include "ifiter_getifaddrs.c"
-#elif HAVE_IFLIST_SYSCTL
+#elif defined(HAVE_IFLIST_SYSCTL) && HAVE_IFLIST_SYSCTL
 #include "ifiter_sysctl.c"
 #else
 #include "ifiter_ioctl.c"


=====================================
ntpd/ntp_packetstamp.c
=====================================
--- a/ntpd/ntp_packetstamp.c
+++ b/ntpd/ntp_packetstamp.c
@@ -70,8 +70,7 @@ enable_packetstamps(
 			DPRINTF(4, ("setsockopt SO_TIMESTAMP enabled on fd %d address %s\n",
 				    fd, socktoa(addr)));
 	}
-#endif
-#ifdef USE_SCM_TIMESTAMPNS
+#elif defined (USE_SCM_TIMESTAMPNS)
 	{
 		const int	on = 1;
 		if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPNS,
@@ -83,8 +82,7 @@ enable_packetstamps(
 			DPRINTF(4, ("setsockopt SO_TIMESTAMPNS enabled on fd %d address %s\n",
 				    fd, socktoa(addr)));
 	}
-#endif
-#ifdef USE_SCM_BINTIME
+#elif defined(USE_SCM_BINTIME)
 	{
 		const int	on = 1;
 		if (setsockopt(fd, SOL_SOCKET, SO_BINTIME,
@@ -96,6 +94,10 @@ enable_packetstamps(
 			DPRINTF(4, ("setsockopt SO_BINTIME enabled on fd %d address %s\n",
 				    fd, socktoa(addr)));
 	}
+#else
+        /* probably Slowlaris */
+        UNUSED(fd);
+        UNUSED(addr);
 #endif
 }
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/99df9ac91a01a254ca19bbf72d1c2f0fe297d522...b2df2592d701cf0c3ed4791c69b28cfd92bdeffb

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/99df9ac91a01a254ca19bbf72d1c2f0fe297d522...b2df2592d701cf0c3ed4791c69b28cfd92bdeffb
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/20170531/5932ec4a/attachment.html>


More information about the vc mailing list