Commit 28514815 authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #614

Fix build with OpenSSL enabled on windows
parents 9f87c071 ae47252f
......@@ -59,8 +59,8 @@
# define WINVER WindowsVista
# include <w32api.h>
# endif
# include <windows.h>
# include <winsock2.h>
# include <windows.h>
# include <ws2tcpip.h>
# include <ws2ipdef.h>
#else
......
......@@ -22,7 +22,14 @@
#define CAF_SUITE openssl_authentication
#include "caf/test/unit_test.hpp"
#include <unistd.h>
#ifndef CAF_WINDOWS
# include <unistd.h>
#else
# include <io.h>
# include <windows.h>
# define F_OK 0
# define PATH_MAX MAX_PATH
#endif
#include <vector>
#include <sstream>
......@@ -60,10 +67,14 @@ public:
// TODO: https://github.com/actor-framework/actor-framework/issues/555
path += "/../../libcaf_openssl/test";
char rpath[PATH_MAX];
#ifndef CAF_WINDOWS
auto rp = realpath(path.c_str(), rpath);
#else
auto rp = GetFullPathName(path.c_str(), PATH_MAX, rpath, nullptr);
#endif
std::string result;
if (rp)
result = rp;
result = rpath;
return result;
}
};
......
......@@ -56,7 +56,9 @@ struct fixture {
config client_side_config;
actor_system client_side{client_side_config};
fixture() {
#ifdef CAF_LINUX
signal(SIGPIPE, SIG_IGN);
#endif
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment