From dda7eb5ff4d38cc0f280aa0e828da46e6d97195b Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 24 May 2010 09:30:42 +0000 Subject: fix format string warning on OS X Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 936 (Provide microsecond timestamp in logfile) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=936 --- libglusterfs/src/logging.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/logging.c') 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) -- cgit