[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mono / utils / mono-log-common.c
index 6590cb54bdcae62b31fe2cb216c6f94ab3a24687..dd20f86b138618eba103b430fac6ca15d20286f5 100644 (file)
@@ -107,19 +107,20 @@ mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool
                pid_t pid;
                char logTime [80];
 
-#ifndef HOST_WIN32
+#ifdef HAVE_LOCALTIME_R
                struct tm tod;
                time(&t);
                localtime_r(&t, &tod);
-               pid = getpid();
                strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod);
 #else
                struct tm *tod;
                time(&t);
                tod = localtime(&t);
-               pid = mono_process_current_pid ();
                strftime(logTime, sizeof(logTime), "%F %T", tod);
 #endif
+
+               pid = mono_process_current_pid ();
+
                fprintf (logFile, "%s level[%c] mono[%d]: %s\n", logTime, mapLogFileLevel (level), pid, message);
        } else {
                fprintf (logFile, "%s%s%s\n",