mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7091417: recvfrom's 6th input should be of type socklen_t
Revamp class os's socket method formal args to match socket.h, insert casts in appropriate places, and copyin-copyout int*'s that s/b socklen_t*'s in jvm.cpp. Co-authored-by: Rickard Backman <rickard.backman@oracle.com> Co-authored-by: Nils Loodin <nils.loodin@oracle.com> Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
577403d2ca
commit
5657eb0c6c
12 changed files with 159 additions and 164 deletions
|
@ -243,24 +243,25 @@ inline int os::socket_shutdown(int fd, int howto){
|
|||
return ::shutdown(fd, howto);
|
||||
}
|
||||
|
||||
inline int os::get_sock_name(int fd, struct sockaddr *him, int *len){
|
||||
return ::getsockname(fd, him, (socklen_t*) len);
|
||||
inline int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len){
|
||||
return ::getsockname(fd, him, len);
|
||||
}
|
||||
|
||||
inline int os::get_host_name(char* name, int namelen){
|
||||
return ::gethostname(name, namelen);
|
||||
}
|
||||
|
||||
inline struct hostent* os::get_host_by_name(char* name) {
|
||||
inline struct hostent* os::get_host_by_name(char* name) {
|
||||
return ::gethostbyname(name);
|
||||
}
|
||||
|
||||
inline int os::get_sock_opt(int fd, int level, int optname,
|
||||
char *optval, int* optlen){
|
||||
return ::getsockopt(fd, level, optname, optval, (socklen_t*) optlen);
|
||||
char* optval, socklen_t* optlen) {
|
||||
return ::getsockopt(fd, level, optname, optval, optlen);
|
||||
}
|
||||
|
||||
inline int os::set_sock_opt(int fd, int level, int optname,
|
||||
const char *optval, int optlen){
|
||||
const char *optval, socklen_t optlen) {
|
||||
return ::setsockopt(fd, level, optname, optval, optlen);
|
||||
}
|
||||
#endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue