diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-10-20 16:03:49 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-10-20 22:52:21 -0400 |
commit | ca5bb5d5390e4ec709ca3e11c451c58a836d4ee6 (patch) | |
tree | f697e93b3d102e9dc9fbb6cc21adb43b360ac0dd /compat | |
parent | Avoid scary errors about tagged trees/blobs during git-fetch (diff) | |
download | tgif-ca5bb5d5390e4ec709ca3e11c451c58a836d4ee6.tar.xz |
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 'compat')
-rw-r--r-- | compat/mkdtemp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/mkdtemp.c b/compat/mkdtemp.c new file mode 100644 index 0000000000..34d4b49818 --- /dev/null +++ b/compat/mkdtemp.c @@ -0,0 +1,8 @@ +#include "../git-compat-util.h" + +char *gitmkdtemp(char *template) +{ + if (!mktemp(template) || mkdir(template, 0700)) + return NULL; + return template; +} |