1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

Properly use BLOCKING_IO_RETURN_INT() macro for NET_Accept().

This commit is contained in:
Jung-uk Kim 2015-02-16 23:58:16 +00:00
parent ef620fd338
commit 6ff1cd31f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379126
4 changed files with 34 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER}
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \

View File

@ -0,0 +1,16 @@
--- jdk/src/solaris/native/java/net/bsd_close.c
+++ jdk/src/solaris/native/java/net/bsd_close.c
@@ -316,11 +316,8 @@
}
int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
- socklen_t len = *addrlen;
- int error = accept(s, addr, &len);
- if (error != -1)
- *addrlen = (int)len;
- BLOCKING_IO_RETURN_INT( s, error );
+ /* See NET_RecvFrom() */
+ BLOCKING_IO_RETURN_INT( s, accept(s, addr, (socklen_t *)addrlen) );
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {

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,16 @@
--- jdk/src/solaris/native/java/net/bsd_close.c
+++ jdk/src/solaris/native/java/net/bsd_close.c
@@ -316,11 +316,8 @@
}
int NET_Accept(int s, struct sockaddr *addr, int *addrlen) {
- socklen_t len = *addrlen;
- int error = accept(s, addr, &len);
- if (error != -1)
- *addrlen = (int)len;
- BLOCKING_IO_RETURN_INT( s, error );
+ /* See NET_RecvFrom() */
+ BLOCKING_IO_RETURN_INT( s, accept(s, addr, (socklen_t *)addrlen) );
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {