diff options
author | marha <marha@users.sourceforge.net> | 2012-05-29 08:45:04 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-29 08:45:04 +0200 |
commit | ce592e25d6303a8f4a8aa0e2918e0f72a35bf175 (patch) | |
tree | 845b108f004259a6e4f72ade3dd5e0521ab3952b /fontconfig/src/fcatomic.c | |
parent | eef864d36de97903007f04fad9fa43afe297745b (diff) | |
download | vcxsrv-ce592e25d6303a8f4a8aa0e2918e0f72a35bf175.tar.gz vcxsrv-ce592e25d6303a8f4a8aa0e2918e0f72a35bf175.tar.bz2 vcxsrv-ce592e25d6303a8f4a8aa0e2918e0f72a35bf175.zip |
fontconfig libX11 mesa pixman xserver git update 29 May 2012
Diffstat (limited to 'fontconfig/src/fcatomic.c')
-rw-r--r-- | fontconfig/src/fcatomic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c index 33c1cc628..4f6ab01f4 100644 --- a/fontconfig/src/fcatomic.c +++ b/fontconfig/src/fcatomic.c @@ -130,6 +130,13 @@ FcAtomicLock (FcAtomic *atomic) return FcFalse; } ret = link ((char *) atomic->tmp, (char *) atomic->lck); + if (ret < 0 && errno == EPERM) + { + /* the filesystem where atomic->lck points to may not supports + * the hard link. so better try to fallback + */ + ret = mkdir ((char *) atomic->lck, 0600); + } (void) unlink ((char *) atomic->tmp); #else ret = mkdir ((char *) atomic->lck, 0600); @@ -195,7 +202,8 @@ void FcAtomicUnlock (FcAtomic *atomic) { #ifdef HAVE_LINK - unlink ((char *) atomic->lck); + if (unlink ((char *) atomic->lck) == -1) + rmdir ((char *) atomic->lck); #else rmdir ((char *) atomic->lck); #endif |