Skip to content

Commit

Permalink
fix for NetBSD 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Apr 1, 2024
1 parent f559ebe commit 3035ef0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ptlib/unix/socket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,14 @@ PBoolean PIPSocket::GetRouteTable(RouteTable & table)
PBoolean process_rtentry(struct rt_msghdr *rtm, char *ptr, PIPSocket::Address & net_addr,
PIPSocket::Address & net_mask, PIPSocket::Address & dest_addr, int & metric) {

// obsolete since NetBSD 8.0, not defined any more in NetBSD 10.0, re-add them here to keep the code portable accross versions
#ifndef RTF_LLINFO
#define RTF_LLINFO 0x400
#endif
#ifndef RTF_CLONED
#define RTF_CLONED 0x2000
#endif

struct sockaddr_in *sa_in = (struct sockaddr_in *)(rtm + 1);

// Check for zero length entry
Expand Down

0 comments on commit 3035ef0

Please sign in to comment.