aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcatomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/fcatomic.c')
-rw-r--r--fontconfig/src/fcatomic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c
index 4f6ab01f4..bc7b07bd4 100644
--- a/fontconfig/src/fcatomic.c
+++ b/fontconfig/src/fcatomic.c
@@ -99,12 +99,13 @@ FcAtomicCreate (const FcChar8 *file)
FcBool
FcAtomicLock (FcAtomic *atomic)
{
- int fd = -1;
- FILE *f = 0;
int ret;
struct stat lck_stat;
#ifdef HAVE_LINK
+ int fd = -1;
+ FILE *f = 0;
+
strcpy ((char *) atomic->tmp, (char *) atomic->file);
strcat ((char *) atomic->tmp, TMP_NAME);
fd = mkstemp ((char *) atomic->tmp);
@@ -185,7 +186,7 @@ FcBool
FcAtomicReplaceOrig (FcAtomic *atomic)
{
#ifdef _WIN32
- unlink (atomic->file);
+ unlink ((const char *) atomic->file);
#endif
if (rename ((char *) atomic->new, (char *) atomic->file) < 0)
return FcFalse;