diff --git a/source/adios2/toolkit/transport/file/FileHTTP.cpp b/source/adios2/toolkit/transport/file/FileHTTP.cpp index e1e7589240..7e07358be4 100644 --- a/source/adios2/toolkit/transport/file/FileHTTP.cpp +++ b/source/adios2/toolkit/transport/file/FileHTTP.cpp @@ -23,12 +23,16 @@ #define INST_ADDRSTRLEN 50 #else #include -#include - +#ifdef __WIN32__ +// Not visual studio, but still windows +#include +#else #include +#include +#include +#endif #include #include -#include #include #endif namespace adios2 diff --git a/source/adios2/toolkit/transport/file/FilePOSIX.cpp b/source/adios2/toolkit/transport/file/FilePOSIX.cpp index 3029667313..bbf4d1b7d3 100644 --- a/source/adios2/toolkit/transport/file/FilePOSIX.cpp +++ b/source/adios2/toolkit/transport/file/FilePOSIX.cpp @@ -22,7 +22,9 @@ #include #ifndef _MSC_VER #include // write, close, ftruncate +#ifndef O_BINARY #define O_BINARY 0 +#endif #else #include #define close _close diff --git a/thirdparty/enet/enet/win32.c b/thirdparty/enet/enet/win32.c index 0953466a3d..5a84228b65 100644 --- a/thirdparty/enet/enet/win32.c +++ b/thirdparty/enet/enet/win32.c @@ -9,6 +9,7 @@ #include #include #include +#include static enet_uint32 timeBase = 0; diff --git a/thirdparty/ffs/ffs/CMakeLists.txt b/thirdparty/ffs/ffs/CMakeLists.txt index 18552a04d0..f519d552cc 100644 --- a/thirdparty/ffs/ffs/CMakeLists.txt +++ b/thirdparty/ffs/ffs/CMakeLists.txt @@ -272,6 +272,7 @@ CHECK_INCLUDE_FILE(sys/un.h HAVE_SYS_UN_H) CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) CHECK_INCLUDE_FILE(winsock.h HAVE_WINSOCK_H) +CHECK_INCLUDE_FILE(winsock2.h HAVE_WINSOCK2_H) if(SIZEOF_SIZE_T EQUAL SIZEOF_INT) set(UIO_SIZE_T_TYPE "unsigned int") diff --git a/thirdparty/ffs/ffs/config.h.cmake b/thirdparty/ffs/ffs/config.h.cmake index d02baec245..17c9d90be9 100755 --- a/thirdparty/ffs/ffs/config.h.cmake +++ b/thirdparty/ffs/ffs/config.h.cmake @@ -99,6 +99,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_WINSOCK_H +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_WINSOCK2_H + /* Define if you need struct iovec to be defined */ #cmakedefine NEED_IOVEC_DEFINE diff --git a/thirdparty/ffs/ffs/fm/nt_io.c b/thirdparty/ffs/ffs/fm/nt_io.c index d33155826e..9e6f9da3b8 100755 --- a/thirdparty/ffs/ffs/fm/nt_io.c +++ b/thirdparty/ffs/ffs/fm/nt_io.c @@ -5,13 +5,15 @@ #define HAVE_IOVEC_DEFINE #endif #define FD_SETSIZE 1024 +#ifdef HAVE_WINSOCK2_H +#include "winsock2.h" +#endif #include #include #include #include -#include "ffs.h" -#include "io_interface.h" -#include "ffs_internal.h" +#include "fm.h" +#include "fm_internal.h" static int nt_file_read_func(conn, buffer, length, errno_p, result_p) diff --git a/thirdparty/ffs/ffs/fm/unix_io.c b/thirdparty/ffs/ffs/fm/unix_io.c index 47c6eacbbf..d513b1a719 100755 --- a/thirdparty/ffs/ffs/fm/unix_io.c +++ b/thirdparty/ffs/ffs/fm/unix_io.c @@ -23,6 +23,9 @@ #include #define HAVE_IOVEC_DEFINE #endif +#ifdef HAVE_WINSOCK2_H +#include "winsock2.h" +#endif #include #include "fm.h" #include "fm_internal.h"