summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-10-08 11:02:55 +0530
committerAnand Avati <avati@redhat.com>2012-10-17 23:37:03 -0700
commit56d1f81949fde78615cd9fec048259d261f99c40 (patch)
treef3cb391dcdd9245359ce2e7ef3c5f62eb684fb29 /libglusterfs
parent2b8043986e6f35a91bf1919c657d73f67b905ef7 (diff)
glusterfs: add gf_mkostemp api and use it instead of mkostemp of libc
Change-Id: Icc12b99e2233d22037e2c4bb2b6966e45668b7dd BUG: 764890 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4091 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/Makefile.am1
-rw-r--r--libglusterfs/src/compat.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 6b55c645241..0503e97f6b0 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -24,6 +24,7 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
graph-print.c trie.c run.c options.c fd-lk.c circ-buff.c \
event-history.c gidcache.c ctx.c \
$(CONTRIBDIR)/libgen/basename_r.c $(CONTRIBDIR)/libgen/dirname_r.c \
+ $(CONTRIBDIR)/stdlib/gf_mkostemp.c \
event-poll.c event-epoll.c
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index af890485df5..3d0cee1a986 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -344,6 +344,9 @@ char *dirname_r(char *path);
#define dirname(path) dirname_r(path)
#endif /* THREAD_UNSAFE_DIRNAME */
+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 */
#define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atim.tv_nsec)