Kaydet (Commit) 07113bc9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

At least old Mac OS X does not know AT_FDCWD

...lets hope it is actually declared as a macro wherever it is known.

Change-Id: If541d02af3ac5d9ad4f0ac1cb4dd9f9f4550a78a
üst b8689142
......@@ -868,12 +868,15 @@ void attemptChangeMetadata( const sal_Char* pszFileName, mode_t nMode, time_t nA
{
struct utimbuf aTimeBuffer;
#if !defined AT_FDCWD
if (!S_ISLNK(nMode) && chmod(pszFileName, nMode) < 0)
#else
if ( fchmodat(AT_FDCWD, pszFileName, nMode, AT_SYMLINK_NOFOLLOW) < 0 )
#endif
{
int e = errno;
SAL_INFO(
"sal.osl",
"fchmodat(" << pszFileName << ") failed with errno " << e);
"sal.osl", "chmod(" << pszFileName << ") failed with errno " << e);
}
// No way to change utime of a symlink itself:
......
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