Per request from George, use defined(__APPLE__) instead of OPAL_HAVE_MAC. Don't try to close a negative socket
Этот коммит содержится в:
родитель
0a345d34e6
Коммит
d3d3e73099
@ -57,12 +57,6 @@ AC_DEFUN([OPAL_CHECK_OS_FLAVORS],
|
||||
[$opal_have_solaris],
|
||||
[Whether or not we have solaris])
|
||||
|
||||
AS_IF([test "$opal_found_apple" = "yes"],
|
||||
[opal_have_mac=1], [opal_have_mac=0])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_MAC],
|
||||
[$opal_have_mac],
|
||||
[Whether or not we are on a Mac])
|
||||
|
||||
# check for sockaddr_in (a good sign we have TCP)
|
||||
AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h])
|
||||
AC_CHECK_TYPES([struct sockaddr_in],
|
||||
|
@ -72,7 +72,7 @@
|
||||
/**
|
||||
* Set socket buffering
|
||||
*/
|
||||
#if defined(SO_KEEPALIVE) && !OPAL_HAVE_MAC
|
||||
#if defined(SO_KEEPALIVE) && !defined(__APPLE__)
|
||||
static void set_keepalive(int sd)
|
||||
{
|
||||
int option;
|
||||
@ -182,7 +182,7 @@ void orte_oob_tcp_set_socket_options(int sd)
|
||||
opal_socket_errno);
|
||||
}
|
||||
#endif
|
||||
#if defined(SO_KEEPALIVE) && !OPAL_HAVE_MAC
|
||||
#if defined(SO_KEEPALIVE) && !defined(__APPLE__)
|
||||
if (0 < mca_oob_tcp_component.keepalive_time) {
|
||||
set_keepalive(sd);
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ static int tcp_component_register(void)
|
||||
&mca_oob_tcp_component.disable_ipv6_family);
|
||||
#endif
|
||||
|
||||
#if !OPAL_HAVE_MAC
|
||||
#if !defined(__APPLE__)
|
||||
mca_oob_tcp_component.keepalive_time = 10;
|
||||
(void)mca_base_component_var_register(component, "keepalive_time",
|
||||
"Idle time in seconds before starting to send keepalives (num <= 0 ----> disable keepalive)",
|
||||
|
@ -747,7 +747,6 @@ static void* listen_thread(opal_object_t *obj)
|
||||
(struct sockaddr*)&(pending_connection->addr),
|
||||
&addrlen);
|
||||
if (pending_connection->fd < 0) {
|
||||
CLOSE_THE_SOCKET(pending_connection->fd);
|
||||
OBJ_RELEASE(pending_connection);
|
||||
if (opal_socket_errno != EAGAIN ||
|
||||
opal_socket_errno != EWOULDBLOCK) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user