From 5e81848445d36d62f21d2d24c9a1edcf2836a09f Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 25 Apr 2014 18:45:19 -0700 Subject: [PATCH] Darwin caused ipc mutex to stop working for non-darwin, non-windows systems. Hopefully fixed --- common/ipc_mutex.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/common/ipc_mutex.cpp b/common/ipc_mutex.cpp index 331144eca..c05fb072c 100644 --- a/common/ipc_mutex.cpp +++ b/common/ipc_mutex.cpp @@ -55,17 +55,22 @@ namespace EQEmu { std::string final_name = name; final_name += ".lock"; -#ifdef __DARWIN +#ifdef __DARWIN #if __DARWIN_C_LEVEL < 200809L imp_->fd_ = open(final_name.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); #else - imp_->fd_ = open(final_name.c_str(), - O_RDWR | O_CREAT | O_CLOEXEC, - S_IRUSR | S_IWUSR); + imp_->fd_ = open(final_name.c_str(), + O_RDWR | O_CREAT | O_CLOEXEC, + S_IRUSR | S_IWUSR); #endif +#else + imp_->fd_ = open(final_name.c_str(), + O_RDWR | O_CREAT | O_CLOEXEC, + S_IRUSR | S_IWUSR); #endif + if(imp_->fd_ == -1) { EQ_EXCEPT("IPC Mutex", "Could not create mutex."); }