summaryrefslogtreecommitdiff
path: root/mysys/mf_tempfile.c
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.vnet.ibm.com>2018-03-02 10:19:43 +1100
committerVladislav Vaintroub <wlad@mariadb.com>2018-05-21 16:34:11 +0000
commitf165077aa9b9df874a712d731e16968eb30875d4 (patch)
tree1c30b8b62638db66e47a64331e21be2b417bf681 /mysys/mf_tempfile.c
parentd5db2f1084b2e7d85caf26781ea1382881c72bdd (diff)
downloadmariadb-git-f165077aa9b9df874a712d731e16968eb30875d4.tar.gz
MDEV-8743: use mkostemp when available with O_CLOEXEC
Closes #639
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r--mysys/mf_tempfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 40787c77295..1abb3bca814 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -22,7 +22,9 @@
#include <paths.h>
#endif
-
+#ifdef HAVE_MKOSTEMP
+#define mkstemp(A) mkostemp(A, O_CLOEXEC)
+#endif
/*
@brief