src/jdk.sctp/unix/native/libsctp/SctpNet.c
changeset 57826 bf4c808a4488
parent 47216 71c04702a3d5
equal deleted inserted replaced
57825:8c73d2a46ba9 57826:bf4c808a4488
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   398 jobjectArray getRemoteAddresses(JNIEnv *env, jint fd, sctp_assoc_t id) {
   398 jobjectArray getRemoteAddresses(JNIEnv *env, jint fd, sctp_assoc_t id) {
   399     void *addr_buf, *paddr;
   399     void *addr_buf, *paddr;
   400     int i, addrCount;
   400     int i, addrCount;
   401     jobjectArray isaa;
   401     jobjectArray isaa;
   402 
   402 
   403 #if __solaris__
   403 #if defined(__solaris__)
   404     if ((addrCount = nio_sctp_getpaddrs(fd, id, (void **)&addr_buf)) == -1) {
   404     if ((addrCount = nio_sctp_getpaddrs(fd, id, (void **)&addr_buf)) == -1) {
   405 #else /* __linux__ */
   405 #else /* __linux__ */
   406     if ((addrCount = nio_sctp_getpaddrs(fd, id, (struct sockaddr **)&addr_buf)) == -1) {
   406     if ((addrCount = nio_sctp_getpaddrs(fd, id, (struct sockaddr **)&addr_buf)) == -1) {
   407 #endif
   407 #endif
   408         handleSocketError(env, errno);
   408         handleSocketError(env, errno);