cygwin needs inet_aton

This commit is contained in:
Duncan Laurie 2005-01-18 16:49:43 +00:00
parent e9281ea912
commit 55ee755de8
2 changed files with 8 additions and 0 deletions

View File

@ -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) {

View File

@ -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) {