log: fix runtime error and MacOS build fail 72/25272/2
authorSooyoung Ha <yoosah.ha@samsung.com>
Fri, 1 Aug 2014 06:31:33 +0000 (15:31 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Fri, 1 Aug 2014 08:54:29 +0000 (17:54 +0900)
Change-Id: I80581c8810595dd6166989b8a609c5de9031470d
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
tizen/src/util/osutil.h

index f24a6b5..f885823 100644 (file)
@@ -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);