Permalink
Browse files

Fix portability issue for non-Windows platforms

  • Loading branch information...
lutzpogrell authored and mbert committed Jan 10, 2016
1 parent 2c182a5 commit 6b7951a3ca56e01a7be67aa12e55bfeafc63950d
Showing with 6 additions and 0 deletions.
  1. +6 −0 Plug-ins/Common/CSecurityPluginDLL.cp
@@ -570,7 +570,13 @@ int CSecurityPluginDLL::mkstemp(fspec ftemp, bool open_fd)
// Create/open the temp file
if (open_fd)
+ {
+#if __dest_os == __win32_os
fd = ::open(tmp.c_str(), O_CREAT | O_RDWR | O_BINARY, _S_IREAD | _S_IWRITE /* file should be writeable after closing */);
+#else
+ fd = ::open(tmp.c_str(), O_CREAT | O_RDWR | O_BINARY);
+#endif
+ }
else
fd = 1;
}

0 comments on commit 6b7951a

Please sign in to comment.