summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/logging.c')
-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 e298b327e51..e7f61623133 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)