Don't use IP_PKTINFO on NetBSD.

This commit is contained in:
joerg 2013-08-31 14:53:45 +00:00
parent 3782879ae9
commit 020f4e3cab
2 changed files with 24 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.8 2013/08/16 08:30:20 hannken Exp $
$NetBSD: distinfo,v 1.9 2013/08/31 14:53:45 joerg Exp $
SHA1 (chrony-1.29.tar.gz) = 442fb7d62a6f23bf1057864a3dbdfa55e1b6eb35
RMD160 (chrony-1.29.tar.gz) = 53518efdd90c4695005d7cc929077985f16887d7
@ -10,3 +10,4 @@ SHA1 (patch-ad) = df47df974995f9f947b731a4812fb7633fd874a4
SHA1 (patch-ae) = 133e90d0614ef5961305b952d9a7a4047a2edcc7
SHA1 (patch-af) = 43c5e0f14aa8a980af83ba4ea5691705a4738064
SHA1 (patch-ag) = 165daaab8507cca8b29a61af576711c0ec05a3a6
SHA1 (patch-ntp__io.c) = 9b9503cf63fba28f57aa6da9020ca02b5d198bf9

View file

@ -0,0 +1,22 @@
$NetBSD: patch-ntp__io.c,v 1.1 2013/08/31 14:53:45 joerg Exp $
--- ntp_io.c.orig 2013-08-31 11:51:32.000000000 +0000
+++ ntp_io.c
@@ -350,7 +350,7 @@ read_from_socket(void *anything)
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-#ifdef IP_PKTINFO
+#if defined(IP_PKTINFO) && !defined(__NetBSD__)
if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) {
struct in_pktinfo ipi;
@@ -449,7 +449,7 @@ send_packet(void *packet, int packetlen,
msg.msg_flags = 0;
cmsglen = 0;
-#ifdef IP_PKTINFO
+#if defined(IP_PKTINFO) && !defined(__NetBSD__)
if (remote_addr->local_ip_addr.family == IPADDR_INET4) {
struct cmsghdr *cmsg;
struct in_pktinfo *ipi;