diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-09-27 16:45:13 +0800 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-09-27 16:45:13 +0800 |
commit | 32ce3a130eee56e9817d6f01e53c138f43f741fe (patch) | |
tree | 1d6c707d606e4e723641bea34701b9c090061aed /net/bird | |
parent | e52d75ccaff6f6e9f4077b8fc7cb69a2414f484e (diff) | |
download | freebsd-ports-gnome-32ce3a130eee56e9817d6f01e53c138f43f741fe.tar.gz freebsd-ports-gnome-32ce3a130eee56e9817d6f01e53c138f43f741fe.tar.zst freebsd-ports-gnome-32ce3a130eee56e9817d6f01e53c138f43f741fe.zip |
Fix raw sockets operation for bird on -current.
PR: 193245
Submitted by: olivier
Approved by: az (implicit)
Diffstat (limited to 'net/bird')
-rw-r--r-- | net/bird/Makefile | 1 | ||||
-rw-r--r-- | net/bird/files/patch-bsd-sysdep.h | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/net/bird/Makefile b/net/bird/Makefile index c02ac345f4b0..886e9308c308 100644 --- a/net/bird/Makefile +++ b/net/bird/Makefile @@ -3,6 +3,7 @@ PORTNAME?= bird PORTVERSION= 1.4.4 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ftp://bird.network.cz/pub/bird/ \ http://bird.mpls.in/distfiles/bird/ diff --git a/net/bird/files/patch-bsd-sysdep.h b/net/bird/files/patch-bsd-sysdep.h new file mode 100644 index 000000000000..d09aac02867b --- /dev/null +++ b/net/bird/files/patch-bsd-sysdep.h @@ -0,0 +1,23 @@ +--- sysdep/bsd/sysio.h 2014-07-10 01:40:13.000000000 +0400 ++++ sysdep/bsd/sysio.h 2014-09-27 12:12:09.000000000 +0400 +@@ -9,6 +9,9 @@ + #include <net/if_dl.h> + #include <netinet/in_systm.h> // Workaround for some BSDs + #include <netinet/ip.h> ++#ifdef __FreeBSD__ ++#include <sys/param.h> // FreeBSD_version definition ++#endif + + + #ifdef __NetBSD__ +@@ -175,8 +178,8 @@ + ip->ip_src = ipa_to_in4(s->saddr); + ip->ip_dst = ipa_to_in4(s->daddr); + +-#ifdef __OpenBSD__ +- /* OpenBSD expects ip_len in network order, other BSDs expect host order */ ++#if defined __OpenBSD__ || (defined __FreeBSD__ && (__FreeBSD_version >= 1100030)) ++ /* OpenBSD and FreeBSD (since 11) expects ip_len in network order, other BSDs expect host order */ + ip->ip_len = htons(ip->ip_len); + #endif + } |