From: Ondrej Zajicek Date: Fri, 25 Apr 2025 16:29:28 +0000 (+0200) Subject: BSD: Fix build on NetBSD X-Git-Tag: v2.17.1~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=768dfe97dbeac3c157c3e8796e03e9c8a2af973b;p=thirdparty%2Fbird.git BSD: Fix build on NetBSD Newer NetBSD versions removed RTF_LLINFO and added RTF_LLDATA. In FreeBSD, RTF_LLINFO is obsolete, but still defined. --- diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index e8e555af7..d9ec32181 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -421,8 +421,17 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) if (!(flags & RTF_DONE) && !scan) SKIP("not done in async\n"); +#ifdef RTF_LLINFO + /* Obsolete in FreeBSD and NetBSD, still used in OpenBSD */ if (flags & RTF_LLINFO) SKIP("link-local\n"); +#endif + +#ifdef RTF_LLDATA + /* Reported by NetBSD */ + if (flags & RTF_LLDATA) + SKIP("link-local\n"); +#endif GETADDR(&dst, RTA_DST); GETADDR(&gate, RTA_GATEWAY);