summaryrefslogtreecommitdiffhomepage
path: root/compat/shm.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-29 06:36:18 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-29 06:36:18 +0200
commita7df6bae0326968a886685f27a9fa8ff24befd42 (patch)
tree1da29dd62ae985e4c62fc4699a3cd4062083d325 /compat/shm.cpp
parent1ba054cfc09a47fe838f487c042d3b279c3edc73 (diff)
compat: fix Linux build
Issue: #661
Diffstat (limited to 'compat/shm.cpp')
-rw-r--r--compat/shm.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/compat/shm.cpp b/compat/shm.cpp
index 88a2811d..a933f7f9 100644
--- a/compat/shm.cpp
+++ b/compat/shm.cpp
@@ -7,10 +7,12 @@
#include "shm.h"
-#include <QDebug>
-
#if defined(_WIN32)
+#if !defined __WINE__
+# include <QDebug>
+#endif
+
#include <cstring>
#include <stdio.h>
@@ -114,7 +116,9 @@ PortableLockedShm::PortableLockedShm(const char* shmName, const char* mutexName,
if (!hMutex)
{
+#if !defined __WINE__
qDebug() << "CreateMutexA:" << (int) GetLastError();
+#endif
return;
}
@@ -128,7 +132,9 @@ PortableLockedShm::PortableLockedShm(const char* shmName, const char* mutexName,
if (!hMapFile)
{
+#if !defined __WINE__
qDebug() << "CreateFileMappingA:", (int) GetLastError();
+#endif
return;
}
@@ -140,7 +146,11 @@ PortableLockedShm::PortableLockedShm(const char* shmName, const char* mutexName,
mapSize);
if (!mem)
+ {
+#if !defined __WINE__
qDebug() << "MapViewOfFile:" << (int) GetLastError();
+#endif
+ }
}
PortableLockedShm::~PortableLockedShm()
@@ -157,7 +167,10 @@ PortableLockedShm::~PortableLockedShm()
return;
fail:
+ (void)0;
+#if !defined __WINE__
qDebug() << "failed to close mapping";
+#endif
}
bool PortableLockedShm::lock()