summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2014-12-22 22:22:10 +0000
committerroberto <roberto@FreeBSD.org>2014-12-22 22:22:10 +0000
commite033d2f087ee7bf21f8b236abe7f4099aa61b90a (patch)
tree7e245687dfe3f06f1ff6c21cc0e37b95c27b876f
parent629195cc23382ab3b9f07ebde7090f01c886ffa8 (diff)
downloadFreeBSD-src-e033d2f087ee7bf21f8b236abe7f4099aa61b90a.zip
FreeBSD-src-e033d2f087ee7bf21f8b236abe7f4099aa61b90a.tar.gz
Add the two patches from the port in net/ntp/files to fix compilation
issues with vendor code. r375210 & r375215.
-rw-r--r--ntpd/ntp_io.c8
-rw-r--r--ntpd/refclock_mx4200.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index ae00e55..f8c6ee0 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -3454,15 +3454,15 @@ read_network_packet(
if (AF_INET6 == itf->family) {
DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
stoa(&rb->recv_srcadr),
- IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr),
+ IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr),
stoa(&itf->sin),
- !IN6_IS_ADDR_LOOPBACK(&itf->sin)
+ !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
));
}
if ( AF_INET6 == itf->family
- && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr)
- && !IN6_IS_ADDR_LOOPBACK(&itf->sin)
+ && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr)
+ && !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
) {
packets_dropped++;
DPRINTF(1, ("DROPPING that packet\n"));
diff --git a/ntpd/refclock_mx4200.c b/ntpd/refclock_mx4200.c
index c942229..16f83f0 100644
--- a/ntpd/refclock_mx4200.c
+++ b/ntpd/refclock_mx4200.c
@@ -1572,7 +1572,7 @@ mx4200_debug(struct peer *peer, char *fmt, ...)
* Print debug message to stdout
* In the future, we may want to get get more creative...
*/
- mvprintf(fmt, ap);
+ vprintf(fmt, ap);
va_end(ap);
}
@@ -1613,11 +1613,11 @@ mx4200_send(peer, fmt, va_alist)
cp = buf;
*cp++ = '$';
- n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
+ n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
ck = mx4200_cksum(cp, n);
cp += n;
++n;
- n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
+ n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
m = write(pp->io.fd, buf, (unsigned)n);
if (m < 0)
OpenPOWER on IntegriCloud