summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-24 09:30:42 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-26 00:25:59 -0700
commitdda7eb5ff4d38cc0f280aa0e828da46e6d97195b (patch)
treeb88daf5bb607e35942d5c6e3f8d20104e5bf6d25 /libglusterfs
parentb48459eb7369bdc0eac6a516138e5095962449f3 (diff)
fix format string warning on OS X
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 936 (Provide microsecond timestamp in logfile) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=936
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/logging.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index e298b327e..e7f616231 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -216,7 +216,12 @@ log:
strftime (timestr, 256, "%Y-%m-%d %H:%M:%S", tm);
snprintf (timestr + strlen (timestr), 256 - strlen (timestr),
- ".%ld", tv.tv_usec);
+#ifdef GF_DARWIN_HOST_OS
+ ".%"PRId32,
+#else
+ ".%ld",
+#endif
+ tv.tv_usec);
basename = strrchr (file, '/');
if (basename)