summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-08-17 17:21:40 +0100
committerRoy Marples <roy@marples.name>2018-08-17 17:21:40 +0100
commitb4a256853454a132a198caf39442db189e7752b1 (patch)
tree04f1d145e3fe943f4d1707a4aa4f4559bd7ed25e
parent9b99155437a9b883132648beb3b5f856139c7baa (diff)
downloaddhcpcd-b4a256853454a132a198caf39442db189e7752b1.tar.xz
NetBSD-7 has an incomplete IP_PKTINFO implementation.
It only works for receiving data, not sending it. We only need it to send, so pretend it doesn't exist.
-rw-r--r--src/dhcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index 7a6749d4..1e9fe186 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -86,6 +86,11 @@
#define IPDEFTTL 64 /* RFC1340 */
#endif
+/* NetBSD-7 has an incomplete IP_PKTINFO implementation. */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 800000000
+#undef IP_PKTINFO
+#endif
+
/* Assert the correct structure size for on wire */
__CTASSERT(sizeof(struct ip) == 20);
__CTASSERT(sizeof(struct udphdr) == 8);