summaryrefslogtreecommitdiff
path: root/java/netty/files
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2019-09-29 01:01:19 +0000
committerGreg Lewis <glewis@FreeBSD.org>2019-09-29 01:01:19 +0000
commit768af6de1c4120c7c561eb038d1d8c6cd073f531 (patch)
tree934cfb5e8e1602fccf03100d8f885378fa0a2577 /java/netty/files
parentdevel/rust-bindgen: update to 0.51.1 (diff)
Fix build on 12+
* On FreeBSD, the correct cmsg_level for IP_RECVORIGDSTADDR is IP_PROTOIP.
Notes
Notes: svn path=/head/; revision=513186
Diffstat (limited to 'java/netty/files')
-rw-r--r--java/netty/files/patch-netty_unix_socket.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/netty/files/patch-netty_unix_socket.c b/java/netty/files/patch-netty_unix_socket.c
new file mode 100644
index 000000000000..c66f77191199
--- /dev/null
+++ b/java/netty/files/patch-netty_unix_socket.c
@@ -0,0 +1,12 @@
+--- netty_unix_socket.c.orig 2019-09-28 17:55:20.362544000 -0700
++++ netty_unix_socket.c 2019-09-28 17:59:09.282432000 -0700
+@@ -389,6 +389,9 @@
+ }
+
+ #ifdef IP_RECVORIGDSTADDR
++#if defined(__FreeBSD__) && !defined(SOL_IP)
++#define SOL_IP IPPROTO_IP
++#endif /* __FreeBSD__ && !SOL_IP */
+ if (readLocalAddr) {
+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVORIGDSTADDR) {