diff --git a/packages/muelu/src/Utils/MueLu_Utilities.cpp b/packages/muelu/src/Utils/MueLu_Utilities.cpp index 00cbddb9ed91..8ccc4948fc57 100644 --- a/packages/muelu/src/Utils/MueLu_Utilities.cpp +++ b/packages/muelu/src/Utils/MueLu_Utilities.cpp @@ -54,9 +54,13 @@ #ifdef HAVE_MPI #include +#ifdef _WIN32 +#include +#else #include #include #endif +#endif @@ -265,7 +269,7 @@ bool IsParamValidVariable(const std::string& name) int len; MPI_Get_processor_name(hostname,&len); struct hostent * host = gethostbyname(hostname); - int myaddr = (int) htonl(inet_network(inet_ntoa(*(struct in_addr *)host->h_addr))); + int myaddr = (int) inet_addr(inet_ntoa(*(struct in_addr *)host->h_addr)); // All-to-all exchange of address integers std::vector addressList(numRanks);