Skip to content

Commit

Permalink
Merge pull request #4599 from caohaley/socketAPIFix
Browse files Browse the repository at this point in the history
Fixes to match prototypes to old socket API
  • Loading branch information
rwy7 authored Nov 27, 2019
2 parents 6e4fcab + a2f1d3e commit 14b2756
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions include_core/omrport.h
Original file line number Diff line number Diff line change
Expand Up @@ -1692,15 +1692,15 @@ typedef struct OMRPortLibrary {
/** see @ref omrsock.c::omrsock_getaddrinfo_length "omrsock_getaddrinfo_length"*/
int32_t (*sock_getaddrinfo_length)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t hints, uint32_t *length) ;
/** see @ref omrsock.c::omrsock_getaddrinfo_family "omrsock_getaddrinfo_family"*/
int32_t (*sock_getaddrinfo_family)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t *handle, int32_t *family, int32_t index ) ;
int32_t (*sock_getaddrinfo_family)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *family, int32_t index ) ;
/** see @ref omrsock.c::omrsock_getaddrinfo_socktype "omrsock_getaddrinfo_socktype"*/
int32_t (*sock_getaddrinfo_socktype)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *socktype, int32_t index) ;
/** see @ref omrsock.c::omrsock_getaddrinfo_protocol "omrsock_getaddrinfo_protocol"*/
int32_t (*sock_getaddrinfo_protocol)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *protocol, int32_t index) ;
/** see @ref omrsock.c::omrsock_freeaddrinfo "omrsock_freeaddrinfo"*/
int32_t (*sock_freeaddrinfo)(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle) ;
/** see @ref omrsock.c::omrsock_socket "omrsock_socket"*/
int32_t (*sock_socket)(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, int32_t family, int32_t socktype, int32_t protocol) ;
int32_t (*sock_socket)(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock, int32_t family, int32_t socktype, int32_t protocol) ;
/** see @ref omrsock.c::omrsock_bind "omrsock_bind"*/
int32_t (*sock_bind)(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, omrsock_sockaddr_t addr) ;
/** see @ref omrsock.c::omrsock_listen "omrsock_listen"*/
Expand All @@ -1718,7 +1718,7 @@ typedef struct OMRPortLibrary {
/** see @ref omrsock.c::omrsock_recvfrom "omrsock_recvfrom"*/
int32_t (*sock_recvfrom)(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, uint8_t *buf, int32_t nbyte, int32_t flags, omrsock_sockaddr_t addrHandle) ;
/** see @ref omrsock.c::omrsock_close "omrsock_close"*/
int32_t (*sock_close)(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock) ;
int32_t (*sock_close)(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock) ;
#if defined(OMR_OPT_CUDA)
/** CUDA configuration data */
J9CudaConfig *cuda_configData;
Expand Down
6 changes: 3 additions & 3 deletions port/common/omrsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ omrsock_getaddrinfo_length(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_
* @return 0, if no errors occurred, otherwise return an error.
*/
int32_t
omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t *handle, int32_t *family, int32_t index)
omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *family, int32_t index)
{
return OMRPORT_ERROR_NOT_SUPPORTED_ON_THIS_PLATFORM;
}
Expand Down Expand Up @@ -171,7 +171,7 @@ omrsock_freeaddrinfo(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t hand
* @return 0, if no errors occurred, otherwise return an error.
*/
int32_t
omrsock_socket(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, int32_t family, int32_t socktype, int32_t protocol)
omrsock_socket(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock, int32_t family, int32_t socktype, int32_t protocol)
{
return OMRPORT_ERROR_NOT_SUPPORTED_ON_THIS_PLATFORM;
}
Expand Down Expand Up @@ -362,7 +362,7 @@ omrsock_recvfrom(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, uint
* @return 0, if no errors occurred, otherwise return an error.
*/
int32_t
omrsock_close(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock)
omrsock_close(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock)
{
return OMRPORT_ERROR_NOT_SUPPORTED_ON_THIS_PLATFORM;
}
6 changes: 3 additions & 3 deletions port/omrportpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,15 @@ omrsock_getaddrinfo(struct OMRPortLibrary *portLibrary, char *node, char *servic
extern J9_CFUNC int32_t
omrsock_getaddrinfo_length(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t hints, uint32_t *length);
extern J9_CFUNC int32_t
omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t *handle, int32_t *family, int32_t index);
omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *family, int32_t index);
extern J9_CFUNC int32_t
omrsock_getaddrinfo_socktype(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *socktype, int32_t index);
extern J9_CFUNC int32_t
omrsock_getaddrinfo_protocol(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *protocol, int32_t index);
extern J9_CFUNC int32_t
omrsock_freeaddrinfo(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle);
extern J9_CFUNC int32_t
omrsock_socket(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, int32_t family, int32_t socktype, int32_t protocol);
omrsock_socket(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock, int32_t family, int32_t socktype, int32_t protocol);
extern J9_CFUNC int32_t
omrsock_bind(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, omrsock_sockaddr_t addr);
extern J9_CFUNC int32_t
Expand All @@ -634,7 +634,7 @@ omrsock_recv(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, uint8_t
extern J9_CFUNC int32_t
omrsock_recvfrom(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock, uint8_t *buf, int32_t nbyte, int32_t flags, omrsock_sockaddr_t addrHandle);
extern J9_CFUNC int32_t
omrsock_close(struct OMRPortLibrary *portLibrary, omrsock_socket_t sock);
omrsock_close(struct OMRPortLibrary *portLibrary, omrsock_socket_t *sock);

/* J9SourceJ9Str*/
extern J9_CFUNC uintptr_t
Expand Down

0 comments on commit 14b2756

Please sign in to comment.