mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 11:07:23 +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_family = AF_INET;
|
||||||
s->addr.sin_port = htons(s->port);
|
s->addr.sin_port = htons(s->port);
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
rc = inet_aton(s->hostname, &s->addr.sin_addr);
|
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) {
|
if (rc <= 0) {
|
||||||
struct hostent *host = gethostbyname(s->hostname);
|
struct hostent *host = gethostbyname(s->hostname);
|
||||||
if (host == NULL) {
|
if (host == NULL) {
|
||||||
|
@ -2892,7 +2892,11 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
|
|||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
addr.sin_port = htons(session->port);
|
addr.sin_port = htons(session->port);
|
||||||
|
|
||||||
|
#ifdef __CYGWIN__
|
||||||
rc = inet_aton(session->hostname, &addr.sin_addr);
|
rc = inet_aton(session->hostname, &addr.sin_addr);
|
||||||
|
#else
|
||||||
|
rc = inet_pton(AF_INET, session->hostname, &addr.sin_addr);
|
||||||
|
#endif
|
||||||
if (rc <= 0) {
|
if (rc <= 0) {
|
||||||
struct hostent *host = gethostbyname(session->hostname);
|
struct hostent *host = gethostbyname(session->hostname);
|
||||||
if (host == NULL) {
|
if (host == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user