summaryrefslogtreecommitdiff
path: root/src/journal/test-mmap-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/test-mmap-cache.c')
-rw-r--r--src/journal/test-mmap-cache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/test-mmap-cache.c b/src/journal/test-mmap-cache.c
index e2ffaf4723..7d03bfe9d1 100644
--- a/src/journal/test-mmap-cache.c
+++ b/src/journal/test-mmap-cache.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
+#include <fcntl.h>
#include "log.h"
#include "macro.h"
@@ -36,15 +37,15 @@ int main(int argc, char *argv[]) {
assert_se(m = mmap_cache_new());
- x = mkstemp(px);
+ x = mkostemp_safe(px, O_RDWR|O_CLOEXEC);
assert(x >= 0);
unlink(px);
- y = mkstemp(py);
+ y = mkostemp_safe(py, O_RDWR|O_CLOEXEC);
assert(y >= 0);
unlink(py);
- z = mkstemp(pz);
+ z = mkostemp_safe(pz, O_RDWR|O_CLOEXEC);
assert(z >= 0);
unlink(pz);