From e1ecf0dd6897eae1594b7e9345605b8f88485b95 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 6 Dec 2025 14:27:39 +0100 Subject: wrapper: add git_mkdtemp() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend git_mkstemps_mode() to optionally call mkdir(2) instead of open(2), then use that ability to create a mkdtemp(3) replacement, git_mkdtemp(). We'll start using it in the next commit. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- wrapper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wrapper.h') diff --git a/wrapper.h b/wrapper.h index 44a8597ac3..15ac3bab6e 100644 --- a/wrapper.h +++ b/wrapper.h @@ -37,6 +37,8 @@ int xsnprintf(char *dst, size_t max, const char *fmt, ...); int xgethostname(char *buf, size_t len); +char *git_mkdtemp(char *pattern); + /* set default permissions by passing mode arguments to open(2) */ int git_mkstemps_mode(char *pattern, int suffix_len, int mode); int git_mkstemp_mode(char *pattern, int mode); -- cgit v1.3-5-g9baa