summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-20 16:03:49 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-10-20 22:52:21 -0400
commitca5bb5d5390e4ec709ca3e11c451c58a836d4ee6 (patch)
treef697e93b3d102e9dc9fbb6cc21adb43b360ac0dd /git-compat-util.h
parentcfa5b2b7faa1a620ec6599a63fa5b9b45bd62b57 (diff)
downloadgit-ca5bb5d5390e4ec709ca3e11c451c58a836d4ee6.tar.gz
Define compat version of mkdtemp for systems lacking it
Solaris 9 doesn't have mkdtemp() so we need to emulate it for the rsync transport implementation. Since Solaris 9 is lacking this function we can also reasonably assume it is not available on Solaris 8 either. The new Makfile definition NO_MKDTEMP can be set to enable the git compat version. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index f23d934f66..474f1d1ffb 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -147,6 +147,11 @@ extern ssize_t git_pread(int fd, void *buf, size_t count, off_t offset);
extern int gitsetenv(const char *, const char *, int);
#endif
+#ifdef NO_MKDTEMP
+#define mkdtemp gitmkdtemp
+extern char *gitmkdtemp(char *);
+#endif
+
#ifdef NO_UNSETENV
#define unsetenv gitunsetenv
extern void gitunsetenv(const char *);