Backward port to OSX 10.6 (Snow Leopard)

This commit is contained in:
Corysia Taware
2014-04-05 10:24:28 -07:00
parent f6046477b4
commit 0f67e93a0f
2 changed files with 34 additions and 3 deletions
+9 -2
View File
@@ -55,10 +55,17 @@ namespace EQEmu {
std::string final_name = name;
final_name += ".lock";
#ifdef __DARWIN
#if __DARWIN_C_LEVEL < 200809L
imp_->fd_ = open(final_name.c_str(),
O_RDWR | O_CREAT | O_CLOEXEC,
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);
#endif
#endif
if(imp_->fd_ == -1) {
EQ_EXCEPT("IPC Mutex", "Could not create mutex.");
}