src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c
changeset 48767 0c6ce8fdb50a
parent 47216 71c04702a3d5
child 50984 f1f4b8cd0192
child 56230 489867818774
equal deleted inserted replaced
48766:2c4d1993b5f9 48767:0c6ce8fdb50a
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, 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
   124     } while (rv == -1 && errno == EINTR);
   124     } while (rv == -1 && errno == EINTR);
   125 
   125 
   126     return rv;
   126     return rv;
   127 }
   127 }
   128 
   128 
   129 struct hostent *
   129 int
   130 dbgsysGetHostByName(char *hostname) {
   130 dbgsysGetAddrInfo(char *hostname, char *service,
   131     return gethostbyname(hostname);
   131                   struct addrinfo *hints,
       
   132                   struct addrinfo **results) {
       
   133     return getaddrinfo(hostname, service, hints, results);
   132 }
   134 }
   133 
   135 
   134 unsigned short
   136 unsigned short
   135 dbgsysHostToNetworkShort(unsigned short hostshort) {
   137 dbgsysHostToNetworkShort(unsigned short hostshort) {
   136     return htons(hostshort);
   138     return htons(hostshort);