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 96f01235f..557dbc970 100644
--- a/fontconfig/src/fcatomic.c
+++ b/fontconfig/src/fcatomic.c
@@ -100,12 +100,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);
@@ -186,7 +187,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;