aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/test/test-migration.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-25 08:48:17 +0200
committermarha <marha@users.sourceforge.net>2013-10-25 08:48:17 +0200
commit270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a (patch)
treefa640e591154a031fd5f02b7b5043689e47cc573 /fontconfig/test/test-migration.c
parent4eb0b643ad978d94837e2d587a5d4358f974a25c (diff)
downloadvcxsrv-270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a.tar.gz
vcxsrv-270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a.tar.bz2
vcxsrv-270d3a1aa4137dc15d7b7e5a0958cc8c0bef9a1a.zip
fontconfig mesa git update 25 oct 2013
fontconfig commit 65872e9e46d17e4461c3a891ef23abe156005e04 mesa commit e8f6f244bb1963c4af81f431865355beef1b9cbb
Diffstat (limited to 'fontconfig/test/test-migration.c')
-rw-r--r--fontconfig/test/test-migration.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fontconfig/test/test-migration.c b/fontconfig/test/test-migration.c
index 970965186..f127e276e 100644
--- a/fontconfig/test/test-migration.c
+++ b/fontconfig/test/test-migration.c
@@ -11,6 +11,19 @@
#endif
#include <fontconfig/fontconfig.h>
+#ifdef HAVE_MKDTEMP
+#define fc_mkdtemp mkdtemp
+#else
+char *
+fc_mkdtemp (char *template)
+{
+ if (!mktemp (template) || mkdir (template, 0700))
+ return NULL;
+
+ return template;
+}
+#endif
+
FcBool
mkdir_p(const char *dir)
{
@@ -107,7 +120,7 @@ int
main(void)
{
char template[32] = "fontconfig-XXXXXXXX";
- char *tmp = mkdtemp (template);
+ char *tmp = fc_mkdtemp (template);
size_t len = strlen (tmp), xlen, dlen;
char xdg[256], confd[256], fn[256], nfn[256], ud[256], nud[256];
int ret = -1;