mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
cygwin needs inet_aton
This commit is contained in:
parent
e9281ea912
commit
55ee755de8
@ -1378,7 +1378,11 @@ int ipmi_lan_open(struct ipmi_intf * intf)
|
||||
s->addr.sin_family = AF_INET;
|
||||
s->addr.sin_port = htons(s->port);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
rc = inet_aton(s->hostname, &s->addr.sin_addr);
|
||||
#else
|
||||
rc = inet_pton(AF_INET, s->hostname, &s->addr.sin_addr);
|
||||
#endif
|
||||
if (rc <= 0) {
|
||||
struct hostent *host = gethostbyname(s->hostname);
|
||||
if (host == NULL) {
|
||||
|
@ -2892,7 +2892,11 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_port = htons(session->port);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
rc = inet_aton(session->hostname, &addr.sin_addr);
|
||||
#else
|
||||
rc = inet_pton(AF_INET, session->hostname, &addr.sin_addr);
|
||||
#endif
|
||||
if (rc <= 0) {
|
||||
struct hostent *host = gethostbyname(session->hostname);
|
||||
if (host == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user