summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-10-18 14:46:35 +0530
committerVijay Bellur <vbellur@redhat.com>2012-10-19 08:25:02 -0400
commita94be52f3fe058d29274a30948dc84f8848e1180 (patch)
tree7dd0eecca544cb5e5d355303d538d00bd034f343 /libglusterfs
parentacd958ed5ea5e100ea141ff670e68022a3752d7f (diff)
glusterfs: add gf_mkostemp api and use it instead of mkostemp if libc
Change-Id: I6d72be95d304d2506204159f6533a8e3d6631cc2 BUG: 852041 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/121 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/Makefile.am1
-rw-r--r--libglusterfs/src/compat.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 2dab8735c96..dd07aaa4ea7 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -22,6 +22,7 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
$(CONTRIBDIR)/uuid/parse.c $(CONTRIBDIR)/uuid/unparse.c \
$(CONTRIBDIR)/uuid/uuid_time.c $(CONTRIBDIR)/uuid/compare.c \
$(CONTRIBDIR)/uuid/isnull.c $(CONTRIBDIR)/uuid/unpack.c syncop.c \
+ $(CONTRIBDIR)/stdlib/gf_mkostemp.c \
graph-print.c trie.c run.c options.c fd-lk.c circ-buff.c event-history.c
nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index 24ceed22e80..596699fa7ce 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -341,6 +341,8 @@ dirent_size (struct dirent *entry)
return size;
}
+int gf_mkostemp (char *tmpl, int suffixlen, int flags);
+#define mkostemp(tmpl, flags) gf_mkostemp(tmpl, 0, flags);
#ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
/* Linux, Solaris, Cygwin */