From ae33cbb87a1109b718a535c7587433662dc98071 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 10 Dec 2020 10:04:57 +0000 Subject: Use mkptemp2 --- src/libs6/ftrig1_make.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libs6') diff --git a/src/libs6/ftrig1_make.c b/src/libs6/ftrig1_make.c index 6a6ff11..04c8c73 100644 --- a/src/libs6/ftrig1_make.c +++ b/src/libs6/ftrig1_make.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -22,9 +23,8 @@ int ftrig1_make (ftrig1_t *f, char const *path) tmp[pathlen + 2 + FTRIG1_PREFIXLEN] = ':' ; if (!timestamp(tmp + pathlen + 3 + FTRIG1_PREFIXLEN)) return 0 ; memcpy(tmp + pathlen + FTRIG1_PREFIXLEN + 28, ":XXXXXX", 8) ; - ff.fd = mkptemp(tmp) ; + ff.fd = mkptemp2(tmp, O_NONBLOCK|O_CLOEXEC) ; if (ff.fd == -1) return 0 ; - if (ndelay_on(ff.fd) == -1) goto err1 ; ff.fdw = open_write(tmp) ; if (ff.fdw == -1) goto err1 ; if (!stralloc_ready(&ff.name, pathlen + FTRIG1_PREFIXLEN + 36)) goto err2 ; -- cgit v1.2.3