diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index b91836be..f5f1483d 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -208,7 +208,7 @@ namespace IPC { ///\brief Unlinks the previously opened semaphore void semaphore::unlink() { close(); -#if defined(__CYGWIN__) || defined(_WIN32) +#if !defined(__CYGWIN__) && !defined(_WIN32) if (myName.size()) { sem_unlink(myName.c_str()); } diff --git a/lib/shared_memory.h b/lib/shared_memory.h index 343d2de0..0ec1c796 100644 --- a/lib/shared_memory.h +++ b/lib/shared_memory.h @@ -111,13 +111,12 @@ namespace IPC { char * mapped; }; -#ifdef SHM_ENABLED - #if defined(__CYGWIN__) || defined(_WIN32) void preservePage(std::string); void releasePage(std::string); #endif +#ifdef SHM_ENABLED ///\brief A class for managing shared memory pages. class sharedPage { public: