1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fix build issue on FreeBSD 11

This fixes #174 temporarily, so at least it won't fail to build
This commit is contained in:
Matias Fontanini
2016-11-04 07:55:58 -07:00
parent f2850cc0b9
commit ba9d0b34c6

View File

@@ -244,7 +244,13 @@ vector<Route6Entry> route6_entries() {
while (next < end) {
rtm = (rt_msghdr*)next;
// Filter protocol-cloned entries
if ((rtm->rtm_flags & RTF_WASCLONED) == 0 || (rtm->rtm_flags & RTF_PRCLONING) == 0) {
bool process_entry = true;
// These were removed in recent versions of FreeBSD
#if defined(RTF_WASCLONED) && defined(RTF_PRCLONING)
process_entry = (rtm->rtm_flags & RTF_WASCLONED) == 0 ||
(rtm->rtm_flags & RTF_PRCLONING) == 0;
#endif
if (process_entry) {
parse_header(rtm, sa);
if (sa[RTAX_DST] && sa[RTAX_GATEWAY] && if_indextoname(rtm->rtm_index, iface_name)) {
Route6Entry entry;