weston: prevent localtime() to pollute errno
Several log messages in weston use "%m" in the format string to print the last error in a human readable way. The "%m" converts to a sting the integer value of errno, which is supposed to be not modified since the error has happened.
While adding the timestamp in front of the message, the call to localtime() try to access the system file "/etc/localtime". On systems where such file is missing, errno get polluted and set to ENOENT ("No such file or directory").
Preserve the value of errno across the call to localtime().
Signed-off-by: Antonio Borneo borneo.antonio@gmail.com