. Fix SCTP support.

PR:		230321
Submitted by:	Timo Voelker <timo.voelker@fh-muenster.de>
This commit is contained in:
Greg Lewis 2018-12-08 19:09:28 +00:00
parent 98f840f0fb
commit 4f3b06b197
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=486983
2 changed files with 42 additions and 0 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \

View File

@ -0,0 +1,41 @@
--- jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c.org 2018-07-26 09:56:49.897172000 +0200
+++ jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c 2018-07-30 16:13:19.116935000 +0200
@@ -330,11 +330,11 @@
break;
case SCTP_ADDR_MADE_PRIM :
event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_MADE_PRIM;
-#ifdef __linux__ /* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */
+#ifndef __solaris__ /* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */
break;
case SCTP_ADDR_CONFIRMED :
event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_CONFIRMED;
-#endif /* __linux__ */
+#endif /* __solaris__ */
}
addressObj = SockAddrToInetSocketAddress(env, (struct sockaddr*)&spc->spc_aaddr);
@@ -445,13 +445,13 @@
} else if (errno == EINTR) {
return IOS_INTERRUPTED;
-#ifdef __linux__
+#ifndef __solaris__
} else if (errno == ENOTCONN) {
/* ENOTCONN when EOF reached */
rv = 0;
/* there will be no control data */
msg->msg_controllen = 0;
-#endif /* __linux__ */
+#endif /* __solaris__ */
} else {
handleSocketError(env, errno);
@@ -568,7 +568,7 @@
/* Set up the msghdr structure for sending */
memset(msg, 0, sizeof (*msg));
memset(cbuf, 0, cbuf_size);
- msg->msg_name = &sa;
+ msg->msg_name = (sa_len == 0 ? NULL : &sa);
msg->msg_namelen = sa_len;
iov->iov_base = addr;
iov->iov_len = length;