Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML: Fix socket references for Windows builds #9849

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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