diff options
Diffstat (limited to 'gdbsupport/filestuff.h')
-rw-r--r-- | gdbsupport/filestuff.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdbsupport/filestuff.h b/gdbsupport/filestuff.h index a2cb916..10e9eba 100644 --- a/gdbsupport/filestuff.h +++ b/gdbsupport/filestuff.h @@ -54,11 +54,11 @@ extern scoped_fd gdb_open_cloexec (const char *filename, int flags, /* Like mkstemp, but ensures that the file descriptor is close-on-exec. */ -static inline int +static inline scoped_fd gdb_mkostemp_cloexec (char *name_template, int flags = 0) { /* gnulib provides a mkostemp replacement if needed. */ - return mkostemp (name_template, flags | O_CLOEXEC); + return scoped_fd (mkostemp (name_template, flags | O_CLOEXEC)); } /* Convenience wrapper for the above, which takes the filename as an |