Kaydet (Commit) 327a45d8 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Bypass the O_NONBLOCK resetting for now when sandboxed on OS X

The fcntl fails. Will have to check later whether we should also drop
using O_NONBLOCK when opening then.

Change-Id: I529a4d728563eb323e35487782f7fee88b2faa0c
üst bac11dce
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <config_features.h>
#include "osl/file.hxx" #include "osl/file.hxx"
#include "osl/detail/file.h" #include "osl/detail/file.h"
...@@ -929,6 +930,7 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u ...@@ -929,6 +930,7 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u
return oslTranslateFileError (OSL_FET_ERROR, saved_errno); return oslTranslateFileError (OSL_FET_ERROR, saved_errno);
} }
#if !HAVE_FEATURE_MACOSX_SANDBOX
/* reset O_NONBLOCK flag */ /* reset O_NONBLOCK flag */
if (flags & O_NONBLOCK) if (flags & O_NONBLOCK)
{ {
...@@ -958,7 +960,7 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u ...@@ -958,7 +960,7 @@ SAL_CALL osl_openFilePath( const char *cpFilePath, oslFileHandle* pHandle, sal_u
return eRet; return eRet;
} }
} }
#endif
/* get file status (mode, size) */ /* get file status (mode, size) */
struct stat aFileStat; struct stat aFileStat;
if (-1 == fstat (fd, &aFileStat)) if (-1 == fstat (fd, &aFileStat))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment