diff options
author | Kaushik BV <kaushikbv@gluster.com> | 2011-09-23 19:05:35 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-10-01 05:56:01 -0700 |
commit | 72cade6db5fd3f6f001295a5f4edeecf44e36045 (patch) | |
tree | f8f967ca3a1ec7bafa6180366ecb85c42bada86c /libglusterfs/src/compat.c | |
parent | c2548c3247a17b3b415295fcbb4c119f4a579831 (diff) |
build: Solaris build fixes
Change-Id: I977903f26dbb2c8d1632b3a1c52bd8af4ce8652f
BUG: 3446
Reviewed-on: http://review.gluster.com/502
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'libglusterfs/src/compat.c')
-rw-r--r-- | libglusterfs/src/compat.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c index 90b86d20de5..a5a49d4e6a1 100644 --- a/libglusterfs/src/compat.c +++ b/libglusterfs/src/compat.c @@ -528,6 +528,27 @@ 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 |