]> Git Repo - binutils.git/blobdiff - gdb/unittests/scoped_mmap-selftests.c
Use mkostemp, not mkstemp
[binutils.git] / gdb / unittests / scoped_mmap-selftests.c
index b181e02f50f935d3efa30adf4189b4411cc22b10..75d1aeda8abce18f98206068dde0259195fcb996 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "defs.h"
 
+#include "common/filestuff.h"
 #include "common/scoped_mmap.h"
 #include "config.h"
 
@@ -88,7 +89,7 @@ static void
 test_normal ()
 {
   char filename[] = "scoped_mmapped_file-selftest-XXXXXX";
-  int fd = mkstemp (filename);
+  int fd = gdb_mkostemp_cloexec (filename);
   SELF_CHECK (fd >= 0);
 
   SELF_CHECK (write (fd, "Hello!", 7) == 7);
This page took 0.02518 seconds and 4 git commands to generate.