Skip to content

Commit

Permalink
ML: Fix socket references for Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sskutnik authored and Steve Skutnik committed Oct 22, 2021
1 parent efad248 commit 511cf50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/ml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,7 @@ TRIBITS_ADD_LIBRARY(
HEADERS ${HEADERS}
SOURCES ${SOURCES}
)

if (WIN32)
target_link_libraries (ml PUBLIC ws2_32)
endif ()
4 changes: 4 additions & 0 deletions packages/ml/src/MLAPI/MLAPI_Workspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#ifdef _MSC_VER
#include "winprocess.h"
#endif
#include <unistd.h>
#ifdef _WIN32
#include <winsock2.h>
#endif

namespace MLAPI {

Expand Down
5 changes: 4 additions & 1 deletion packages/ml/src/Utils/ml_epetra_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
#ifdef _MSC_VER
# include "winprocess.h"
#endif
#include <unistd.h>
#ifdef _WIN32
#include <winsock2.h>
#endif

#ifdef HAVE_ML_TEUCHOS
using namespace Teuchos;
Expand All @@ -52,7 +56,6 @@ using namespace Teuchos;
#include "EpetraExt_MatrixMatrix.h"
#endif


// ======================================================================

typedef struct {
Expand Down

0 comments on commit 511cf50

Please sign in to comment.