fallback to the another method to lock when link() failed

Bug 82358 - FcAtomicLock fails on OS X on network mounts
https://bugs.freedesktop.org/show_bug.cgi?id=82358
This commit is contained in:
Akira TAGOH 2014-08-11 12:14:54 +09:00
parent 748a2ce9d4
commit 841753a93f
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ FcAtomicLock (FcAtomic *atomic)
return FcFalse; return FcFalse;
} }
ret = link ((char *) atomic->tmp, (char *) atomic->lck); ret = link ((char *) atomic->tmp, (char *) atomic->lck);
if (ret < 0 && errno == EPERM) if (ret < 0 && (errno == EPERM || errno == ENOTSUP))
{ {
/* the filesystem where atomic->lck points to may not supports /* the filesystem where atomic->lck points to may not supports
* the hard link. so better try to fallback * the hard link. so better try to fallback