diff options
Diffstat (limited to 'cpp/test/IceStorm/federation/Subscriber.cpp')
-rw-r--r-- | cpp/test/IceStorm/federation/Subscriber.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/test/IceStorm/federation/Subscriber.cpp b/cpp/test/IceStorm/federation/Subscriber.cpp index 259d1e39114..ecacac9f19d 100644 --- a/cpp/test/IceStorm/federation/Subscriber.cpp +++ b/cpp/test/IceStorm/federation/Subscriber.cpp @@ -63,12 +63,9 @@ typedef IceUtil::Handle<EventI> EventIPtr; void createLock(const string& name) { -#ifdef _WIN32 - int ret = _open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL); -#else - int ret = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL); -#endif - assert(ret != -1); + int fd = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0777); + assert(fd != -1); + close(fd); } void |