From eb10008b3d50e159368739dd154ecd464d68738c Mon Sep 17 00:00:00 2001 From: Sooyoung Ha Date: Fri, 1 Aug 2014 15:31:33 +0900 Subject: [PATCH] log: fix runtime error and MacOS build fail Change-Id: I80581c8810595dd6166989b8a609c5de9031470d Signed-off-by: Sooyoung Ha --- tizen/src/util/osutil.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tizen/src/util/osutil.h b/tizen/src/util/osutil.h index f24a6b5..f885823 100644 --- a/tizen/src/util/osutil.h +++ b/tizen/src/util/osutil.h @@ -84,14 +84,11 @@ static inline int get_timeofday(char *buf, size_t size) qemu_gettimeofday(&tv); ti = tv.tv_sec; -#ifndef CONFIG_WIN32 - localtime_r(&ti, ptm); -#else + /* In this case, localtime_r() function is not necessary. */ ptm = localtime(&ti); -#endif ret = strftime(buf, size, "%H:%M:%S", ptm); - return ret + g_snprintf(buf + ret, size - ret, ".%06ld", tv.tv_usec); + return ret + g_snprintf(buf + ret, size - ret, ".%06ld", (long)tv.tv_usec); } int get_number_of_processors(void); -- 2.7.4