From 442f64a83bd2c5da085bc6dc50533df2d483be3b Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 16 Jun 2011 04:36:46 +0000 Subject: build: fixes to work on solaris Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 3002 (build issues on solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3002 --- libglusterfs/src/compat.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libglusterfs/src/compat.c') diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c index 42c20f52756..72bd0d3e2b5 100644 --- a/libglusterfs/src/compat.c +++ b/libglusterfs/src/compat.c @@ -528,6 +528,25 @@ solaris_rename (const char *old_path, const char *new_path) return rename(old_path, new_path); } + +char * +mkdtemp (char *tempstring) +{ + char *new_string = NULL; + int ret = 0; + + new_string = mktemp (tempstring); + if (!new_string) + goto out; + + ret = mkdir (new_string, 0700); + if (ret < 0) + new_string = NULL; + +out: + return new_string; +} + #endif /* GF_SOLARIS_HOST_OS */ #ifndef HAVE_STRNLEN -- cgit