From 5b0e2886ac54bad8a98086f8d5e5ac86a9aed2c1 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 5 Apr 2018 21:16:21 +0200 Subject: [PATCH] Fixed compiling in Windows/Cygwin --- lib/shared_memory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index bcb3405e..038bc339 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -349,14 +349,18 @@ namespace IPC { } /// Returns true if the open file still exists. - /// Not implemented under Windows. + /// \TODO Not implemented under Windows. bool sharedPage::exists(){ +#if defined(__CYGWIN__) || defined(_WIN32) + return true;//Not implemented under Windows... +#else #ifdef SHM_ENABLED struct stat sb; if (fstat(handle, &sb)){return false;} return (sb.st_nlink > 0); #else return true; +#endif #endif }