comparison src/os/solaris/vm/os_solaris.inline.hpp @ 4717:11c26bfcf8c7

7091417: recvfrom's 6th input should be of type socklen_t Summary: 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. Reviewed-by: coleenp, dholmes Contributed-by: erik.gahlin@oracle.com, rickard.backman@oracle.com, nils.loodin@oracle.com, markus.gronlund@oracle.com
author phh
date Wed, 21 Dec 2011 15:48:16 -0500
parents 828eafbd85cc
children d2a62e0f25eb
comparison
equal deleted inserted replaced
4716:4502fd5c7698 4717:11c26bfcf8c7
241 241
242 inline int os::socket_shutdown(int fd, int howto){ 242 inline int os::socket_shutdown(int fd, int howto){
243 return ::shutdown(fd, howto); 243 return ::shutdown(fd, howto);
244 } 244 }
245 245
246 inline int os::get_sock_name(int fd, struct sockaddr *him, int *len){ 246 inline int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len){
247 return ::getsockname(fd, him, (socklen_t*) len); 247 return ::getsockname(fd, him, len);
248 } 248 }
249 249
250 inline int os::get_host_name(char* name, int namelen){ 250 inline int os::get_host_name(char* name, int namelen){
251 return ::gethostname(name, namelen); 251 return ::gethostname(name, namelen);
252 } 252 }
253 253
254 inline struct hostent* os::get_host_by_name(char* name) { 254 inline struct hostent* os::get_host_by_name(char* name) {
255 return ::gethostbyname(name); 255 return ::gethostbyname(name);
256 } 256 }
257
257 inline int os::get_sock_opt(int fd, int level, int optname, 258 inline int os::get_sock_opt(int fd, int level, int optname,
258 char *optval, int* optlen){ 259 char* optval, socklen_t* optlen) {
259 return ::getsockopt(fd, level, optname, optval, (socklen_t*) optlen); 260 return ::getsockopt(fd, level, optname, optval, optlen);
260 } 261 }
261 262
262 inline int os::set_sock_opt(int fd, int level, int optname, 263 inline int os::set_sock_opt(int fd, int level, int optname,
263 const char *optval, int optlen){ 264 const char *optval, socklen_t optlen) {
264 return ::setsockopt(fd, level, optname, optval, optlen); 265 return ::setsockopt(fd, level, optname, optval, optlen);
265 } 266 }
266 #endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP 267 #endif // OS_SOLARIS_VM_OS_SOLARIS_INLINE_HPP