summaryrefslogtreecommitdiffstats
path: root/src/fontconfig-1-fix_mktemp_s.patch
blob: e47cc40cf1ebdf9db3e0dd20d99a2e025b01c888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
This file is part of MXE.
See index.html for further information.

From 09b8eb942f77c1073a5f5c1ea0e6193487418f59 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 29 Mar 2013 10:21:29 +0100
Subject: [PATCH] fix mktemp_s


diff --git a/configure.ac b/configure.ac
index 7919372..6a8822b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,7 @@ AC_TYPE_PID_T
 # Checks for library functions.
 AC_FUNC_VPRINTF
 AC_FUNC_MMAP
-AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
+AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
 
 dnl AC_CHECK_FUNCS doesn't check for header files.
 dnl posix_fadvise() may be not available in older libc.
diff --git a/src/fccompat.c b/src/fccompat.c
index a217160..fb383d4 100644
--- a/src/fccompat.c
+++ b/src/fccompat.c
@@ -156,8 +156,8 @@ FcMakeTempfile (char *template)
 	fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
     }
 #  endif
-#elif HAVE__MKTEMP_S
-   if (_mktemp_s(template, strlen(template) + 1) != 0)
+#elif HAVE__MKTEMP
+   if (_mktemp(template) != 0)
        return -1;
    fd = FcOpen(template, O_RDWR | O_EXCL | O_CREAT, 0600);
 #endif
-- 
1.8.1.4