From c12b0d0ef846518db2d9c44676792a4bfc4ffe99 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 19 Apr 2018 22:44:57 +0200 Subject: Windows compat --- common/log.cpp | 5 +++++ common/storage_lmdb.cpp | 5 +++++ synchronizer/main.cpp | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/common/log.cpp b/common/log.cpp index e726cd5..55f6b1f 100644 --- a/common/log.cpp +++ b/common/log.cpp @@ -9,7 +9,12 @@ #include #include #include +#ifdef Q_OS_WIN +#include +#include +#else #include +#endif #include #include #include diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 49f30b5..227d52e 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp @@ -32,6 +32,11 @@ #include #include "log.h" +#ifdef Q_OS_WIN +#include +typedef SSIZE_T ssize_t; +#endif + namespace Sink { namespace Storage { diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index d5520f2..e1e169b 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp @@ -22,7 +22,9 @@ #include #include +#ifndef Q_OS_WIN #include +#endif #include #include #include @@ -47,6 +49,7 @@ static Listener *listener = nullptr; //Print a demangled stacktrace void printStacktrace() { +#ifndef Q_OS_WIN int skip = 1; void *callstack[128]; const int nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); @@ -81,6 +84,7 @@ void printStacktrace() trace_buf << "[truncated]\n"; } std::cerr << trace_buf.str(); +#endif } static int sCounter = 0; -- cgit v1.2.3