Skip to content

Commit

Permalink
Merge Pull Request #9849 from sskutnik/Trilinos/fix_ml_socket_windows
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: ML: Fix socket references for Windows builds
PR Author: sskutnik
  • Loading branch information
trilinos-autotester authored Oct 23, 2021
2 parents 3b37d42 + 511cf50 commit 9c42161
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 9c42161

Please sign in to comment.