From a94be52f3fe058d29274a30948dc84f8848e1180 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 18 Oct 2012 14:46:35 +0530 Subject: glusterfs: add gf_mkostemp api and use it instead of mkostemp if libc Change-Id: I6d72be95d304d2506204159f6533a8e3d6631cc2 BUG: 852041 Signed-off-by: Raghavendra Bhat Reviewed-on: https://code.engineering.redhat.com/gerrit/121 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- libglusterfs/src/Makefile.am | 1 + libglusterfs/src/compat.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'libglusterfs/src') 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 */ -- cgit