1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Fix build on 12+

* On FreeBSD, the correct cmsg_level for IP_RECVORIGDSTADDR is IP_PROTOIP.
This commit is contained in:
Greg Lewis 2019-09-29 01:01:19 +00:00
parent effeb1cbb9
commit 768af6de1c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513186

View File

@ -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) {