Skip to content

Commit

Permalink
attempt to fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorbert committed Nov 21, 2023
1 parent 79f4463 commit 17f4398
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/adios2/helper/adiosNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

#include <string.h> // memcpy

#ifndef _WIN32

#include <netdb.h> //getFQDN
#include <sys/socket.h> //getFQDN
#include <sys/types.h> //getFQDN

#ifndef _WIN32

#if defined(ADIOS2_HAVE_DATAMAN) || defined(ADIOS2_HAVE_TABLE)

#include <iostream>
Expand All @@ -34,7 +34,11 @@
#include <nlohmann_json.hpp>

#endif // ADIOS2_HAVE_DATAMAN || ADIOS2_HAVE_TABLE
#endif // _WIN32

#else // _WIN32
#include <tchar.h>
#include <windows.h> // GetComputerName
#endif // _WIN32

namespace adios2
{
Expand All @@ -50,6 +54,7 @@ std::string GetFQDN() noexcept
memset(hostname, 0, sizeof(hostname));
if (GetComputerName(infoBuf, &bufCharCount))
{
int i;
for (i = 0; i < sizeof(hostname); i++)
{
hostname[i] = infoBuf[i];
Expand Down

0 comments on commit 17f4398

Please sign in to comment.